dillon1000/react

Commit

Add ReactUpdates.setImmediate for async callbacks

Callbacks passed to this setImmediate function are called at the end of the current update cycle, which is guaranteed to be asynchronous but in the same event loop (with the default batching strategy).

This is useful for new-style refs (#1373, #1554) and for fixing #1698.

Test Plan: jest
Browse files
Changed paths2 files
First-parent comparison
M src/core/ReactUpdates.js ModifiedM src/core/__tests__/ReactUpdates-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…