mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update handling-events.md (#8762)
* Update handling-events.md * Update handling-events.md
This commit is contained in:
committed by
Dan Abramov
parent
beb5b74c54
commit
2cb7637607
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user