dillon1000/react

Commit

Don't bind callbacks to setState, setProps etc.

We added a bind to the public instance, but instead we can just pass the
public instance as the context when we execute.

This avoids a warning that fires when we call bind on auto-bound methods.
Browse files
Changed paths4 files
First-parent comparison
M src/classic/class/ReactClass.js ModifiedM src/classic/class/__tests__/ReactBind-test.js ModifiedM src/core/ReactUpdates.js ModifiedM src/modern/class/ReactComponentBase.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…