dillon1000/react

Commit

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.
Browse files
Changed paths1 file
First-parent comparison
M src/core/ReactCompositeComponent.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…