dillon1000/react
Commit
Browse files Adds optional callback to `setState`
This commit adds an optional callback as a second argument to `setState`, to be called after `setState` runs. We never guarantee synchronous execution of `setState`, and as per @phunt, we don't want to make that guarantee because we may eventually batch calls to `setState`. @jwalke agrees with him.
Changed paths1 file
First-parent comparisonsrc/core/ReactCompositeComponent.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…