dillon1000/react

Commit

Handles risky callbacks on setState. Fixes #8238 (#8242)

* Handles risky callbacks on setState. Fixes #8238

* Updates try-catch to cover `callback` when context is not present.

* Updates code to trapErrors instead of swallowing them.

* Fixes flow errors

* Incorporates review comments

* Traps only the first error.

Removes `callbackWasCalled` and updates fiber tests.
Browse files
Changed paths4 files
First-parent comparison
M scripts/fiber/tests-passing.txt ModifiedM src/renderers/shared/fiber/ReactFiberCommitWork.js ModifiedM src/renderers/shared/fiber/ReactFiberUpdateQueue.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncremental-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…