From a1f22dd8551ceccddac949b534d7b4e5b35f7a8b Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 4 Jan 2017 15:59:25 +0000 Subject: [PATCH] Nitpick: use FB style in doc --- docs/react-without-es6.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/react-without-es6.md b/docs/react-without-es6.md index ac92533b7..84fa1fefe 100644 --- a/docs/react-without-es6.md +++ b/docs/react-without-es6.md @@ -97,7 +97,7 @@ In React components declared as ES6 classes, methods follow the same semantics a class SayHello extends React.Component { constructor(props) { super(props); - this.state = { message: 'Hello!' }; + this.state = {message: 'Hello!'}; // This line is important! this.handleClick = this.handleClick.bind(this); } @@ -122,7 +122,7 @@ With `React.createClass()`, this is not necessary because it binds all methods: ```javascript var SayHello = React.createClass({ getInitialState: function() { - return { message: 'Hello!' }; + return {message: 'Hello!'}; }, handleClick: function() { @@ -148,7 +148,7 @@ If the boilerplate code is too unattractive to you, you may enable the **experim class SayHello extends React.Component { constructor(props) { super(props); - this.state = { message: 'Hello!' }; + this.state = {message: 'Hello!'}; } // WARNING: this syntax is experimental! // Using an arrow here binds the method: