Update 03-interactivity-and-dynamic-uis.md
This clarifies when autobinding does and does not happen. I spun my wheels on this for a while. https://medium.com/@goatslacker/react-0-13-x-and-autobinding-b4906189425d
Ben Jaffe committed
Sep 20, 2015 at 09:38 UTC
0203071251e397e3c7bdb696b95eee5dc252eb6f
1 file changed
+1
-1
docs/docs/03-interactivity-and-dynamic-uis.md
+1
-1
@@ -45,7 +45,7 @@ With React you simply pass your event handler as a camelCased prop similar to ho
45
46
Under the hood, React does a few things to keep your code performant and easy to understand.
47
48
-**Autobinding:** When creating callbacks in JavaScript, you usually need to explicitly bind a method to its instance such that the value of `this` is correct. With React, every method is automatically bound to its component instance. React caches the bound method such that it's extremely CPU and memory efficient. It's also less typing!
48
+**Autobinding:** When creating callbacks in JavaScript, you usually need to explicitly bind a method to its instance such that the value of `this` is correct. With React, every method is automatically bound to its component instance (except when using ES6 class syntax). React caches the bound method such that it's extremely CPU and memory efficient. It's also less typing!
49
50
**Event delegation:** React doesn't actually attach event handlers to the nodes themselves. When React starts up, it starts listening for all events at the top level using a single event listener. When a component is mounted or unmounted, the event handlers are simply added or removed from an internal mapping. When an event occurs, React knows how to dispatch it using this mapping. When there are no event handlers left in the mapping, React's event handlers are simple no-ops. To learn more about why this is fast, see [David Walsh's excellent blog post](http://davidwalsh.name/event-delegate).
51