Browse Source

Minor tweaks

main
Dan Abramov 8 years ago
committed by GitHub
parent
commit
d73bb5d287
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      content/docs/faq-functions.md

7
content/docs/faq-functions.md

@ -24,7 +24,8 @@ There are several ways to make sure functions have access to component attribute
```jsx
class Foo extends Component {
constructor () {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
@ -65,7 +66,7 @@ class Foo extends Component {
>**Note:**
>
>Using `Function.prototype.bind` in render creates a new function each time the component renders, which may have performance implications; (see below).
>Using `Function.prototype.bind` in render creates a new function each time the component renders, which may have performance implications (see below).
#### Arrow Function in Render
@ -82,7 +83,7 @@ class Foo extends Component {
>**Note:**
>
>Using an arrow function in render creates a new function each time the component renders, which may have performance implications; (see below).
>Using an arrow function in render creates a new function each time the component renders, which may have performance implications (see below).
### Is it OK to use arrow functions in render methods?

Loading…
Cancel
Save