From ba50af55f701a66ce1982435aa4e90f46e985420 Mon Sep 17 00:00:00 2001 From: Jared Forsyth Date: Tue, 17 Dec 2013 17:12:21 -0700 Subject: [PATCH] one liner --- tips/10-props-in-getInitialState-as-anti-pattern.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tips/10-props-in-getInitialState-as-anti-pattern.md b/tips/10-props-in-getInitialState-as-anti-pattern.md index b63cd0b8..e0f13530 100644 --- a/tips/10-props-in-getInitialState-as-anti-pattern.md +++ b/tips/10-props-in-getInitialState-as-anti-pattern.md @@ -68,14 +68,12 @@ However, it's **not** an anti-pattern if you intentionally make it clear that sy var Counter = React.createClass({ getInitialState: function() { - // naming it initialX clearly indicates that the only purpose + // naming it initialX clearly indicates that the only purpose // of the passed down prop is to initialize something internal return {count: this.props.initialCount}; }, handleClick: function() { - this.setState({ - count: this.state.count + 1 - }); + this.setState({count: this.state.count + 1}); }, render: function() { return
{this.state.count}
;