From f7ecd81a7159e2761542e50911e83b7f9500ea1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Spie=C3=9F?= Date: Mon, 23 Oct 2017 11:42:48 +0200 Subject: [PATCH] Fix style inconsistency I discovered this inconsistency that caused the parentheses to appear/disappear when you toggle the "JSX" button. It also seems like we don't use parentheses for arrow functions with one argument, so this PR makes this behavior consistent. --- src/templates/home.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/templates/home.js b/src/templates/home.js index 0622aaab..e75d9fd8 100644 --- a/src/templates/home.js +++ b/src/templates/home.js @@ -367,7 +367,7 @@ class Timer extends React.Component { } tick() { - this.setState((prevState) => ({ + this.setState(prevState => ({ seconds: prevState.seconds + 1 })); } @@ -432,7 +432,7 @@ class TodoApp extends React.Component { text: this.state.text, id: Date.now() }; - this.setState((prevState) => ({ + this.setState(prevState => ({ items: prevState.items.concat(newItem), text: '' }));