diff --git a/.eslintignore b/.eslintignore index 75fa6231bb..3853accfd9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ /webpack.* +examples diff --git a/examples/conditional/app.js b/examples/conditional/app.js index bb4cb5a926..f9a3060d1c 100644 --- a/examples/conditional/app.js +++ b/examples/conditional/app.js @@ -12,9 +12,9 @@ const App = React.createClass({ }, handleCheckClicked(e) { - const state = {}; - state[e.target.name] = e.target.checked; - this.setState(state); + this.setState({ + [e.target.name]: e.target.checked, + }); }, render() {