From ceaf3fba32d7c8a9ab956a22fe5eacb020ce9a26 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Wed, 20 Nov 2013 11:29:05 -0800 Subject: [PATCH] Add explination of autoBind to DOM Event Listener tip --- docs/tips/11-dom-event-listeners.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/tips/11-dom-event-listeners.md b/docs/tips/11-dom-event-listeners.md index 46e577fff5..1695391523 100644 --- a/docs/tips/11-dom-event-listeners.md +++ b/docs/tips/11-dom-event-listeners.md @@ -42,3 +42,5 @@ React.renderComponent(, 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).