mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Simplify live editor execution logic
This commit is contained in:
@@ -168,9 +168,9 @@ var ReactPlayground = React.createClass({
|
||||
componentWillUpdate: function(nextProps, nextState) {
|
||||
// execute code only when the state's not being updated by switching tab
|
||||
// this avoids re-displaying the error, which comes after a certain delay
|
||||
if (this.state.mode === nextState.mode) {
|
||||
if (this.state.code !== nextState.code) {
|
||||
this.executeCode();
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
executeCode: function() {
|
||||
|
||||
Reference in New Issue
Block a user