Browse Source

Update handling-events.md (#8762)

* Update handling-events.md

* Update handling-events.md
main
Snowmanzzz(Zhengzhong Zhao) 8 years ago
committed by Dan Abramov
parent
commit
45000cb3a7
  1. 2
      docs/handling-events.md

2
docs/handling-events.md

@ -138,4 +138,4 @@ class LoggingButton extends React.Component {
}
```
The problem with this syntax is that a different callback is created each time the `LoggingButton` renders. In most cases, this is fine. However, if this callback is passed as a prop to lower components, those components might do an extra re-rendering. We generally recommend binding in the constructor to avoid this sort of performance problem.
The problem with this syntax is that a different callback is created each time the `LoggingButton` renders. In most cases, this is fine. However, if this callback is passed as a prop to lower components, those components might do an extra re-rendering. We generally recommend binding in the constructor or using the property initializer syntax, to avoid this sort of performance problem.

Loading…
Cancel
Save