mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #577 from stillmotion/master
Add explination of autoBind to DOM Event Listener tip
This commit is contained in:
@@ -42,3 +42,5 @@ React.renderComponent(<Box />, mountNode);
|
||||
```
|
||||
|
||||
`componentDidMount` is called after the component is mounted and has a DOM representation. This is often a place where you would attach generic DOM events.
|
||||
|
||||
Notice that the event callback is bound to the react component and not the original element. React automatically binds methods to the current component instance for you through a process of [autobinding](../docs/interactivity-and-dynamic-uis.html#under-the-hood-autobind-and-event-delegation).
|
||||
|
||||
Reference in New Issue
Block a user