From 0ab70fd1af8a0d513f027324ed193918d2039203 Mon Sep 17 00:00:00 2001 From: Peter Klipfel Date: Wed, 6 Sep 2017 12:49:50 -0600 Subject: [PATCH] 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. --- docs/walkthroughs/installing-slate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/walkthroughs/installing-slate.md b/docs/walkthroughs/installing-slate.md index 2ca7264b5..184836011 100644 --- a/docs/walkthroughs/installing-slate.md +++ b/docs/walkthroughs/installing-slate.md @@ -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 }) }