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:
committed by
Ian Storm Taylor
parent
1075e67830
commit
0ab70fd1af
@@ -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 })
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user