Skip to content

Commit f7ecd81

Browse files
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.
1 parent d0c0aed commit f7ecd81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/templates/home.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class Timer extends React.Component {
367367
}
368368
369369
tick() {
370-
this.setState((prevState) => ({
370+
this.setState(prevState => ({
371371
seconds: prevState.seconds + 1
372372
}));
373373
}
@@ -432,7 +432,7 @@ class TodoApp extends React.Component {
432432
text: this.state.text,
433433
id: Date.now()
434434
};
435-
this.setState((prevState) => ({
435+
this.setState(prevState => ({
436436
items: prevState.items.concat(newItem),
437437
text: ''
438438
}));

0 commit comments

Comments
 (0)