mark as jsx
This commit is contained in:
parent
1a3bc814e1
commit
0fdc2d817c
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ React
|
|||
-----
|
||||
- Use ES6 classes, although bear in mind a lot of code uses createClass.
|
||||
- Pull out functions in props to the class, generally as specific event handlers:
|
||||
```
|
||||
```jsx
|
||||
<Foo onClick={function(ev) {doStuff();}}> // Bad
|
||||
<Foo onClick={(ev) => {doStuff();}}> // Equally bad
|
||||
<Foo onClick={this.doStuff}> // Better
|
||||
|
|
Loading…
Reference in a new issue