From 85beecb9945bdb05873f8ca143e605b6fd243523 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Thu, 15 Sep 2016 11:27:00 +0200 Subject: [PATCH] cleanup examples --- .eslintignore | 1 + examples/conditional/app.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) 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() {