Browse Source

use callback for setState

main
Admir Sabanovic 7 years ago
committed by GitHub
parent
commit
8a0eda3b6e
  1. 2
      src/components/CodeEditor/CodeEditor.js

2
src/components/CodeEditor/CodeEditor.js

@ -312,7 +312,7 @@ class CodeEditor extends Component {
}
_onChange = code => {
this.setState(this._updateState(code, this.state.showJSX));
this.setState(state => this._updateState(code, state.showJSX));
};
}

Loading…
Cancel
Save