dillon1000/react

Commit

Move unstable_yield to main export (#13232)

The `yield` method isn't tied to any specific root. Putting this
on the main export enables test components that are not within scope
to yield even if they don't have access to the currently rendering
root instance. This follows the pattern established by ReactNoop.

Added a `clearYields` method, too, for reading values that were yielded
out of band. This is also based on ReactNoop.
Browse files
Changed paths4 files
First-parent comparison
M packages/react-test-renderer/src/ReactTestRenderer.js ModifiedM packages/react-test-renderer/src/ReactTestRendererScheduling.js ModifiedM packages/react-test-renderer/src/__tests__/ReactTestRendererAsync-test.js ModifiedM packages/react/src/__tests__/ReactProfiler-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…