1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 10:51:44 +02:00

fixes errors for basic app with installation (#1056)

The old onChange function caused a bunch of `Uncaught TypeError: _this.state.state.change is not a function` errors. Adding the object destructure to the arguments fixes this.
This commit is contained in:
Peter Klipfel
2017-09-06 12:49:50 -06:00
committed by Ian Storm Taylor
parent 1075e67830
commit 0ab70fd1af

View File

@@ -82,7 +82,7 @@ class App extends React.Component {
}
// On change, update the app's React state with the new editor state.
onChange = (state) => {
onChange = ({ state }) => {
this.setState({ state })
}