We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React version: 17.0.1 TL;DR: Fixed with skipUnmountedBoundaries = true
skipUnmountedBoundaries = true
act()
Link to code example: React 16 React 17
I also tested it locally and jest and couldn't catch the error as well.
The error is uncatchable and does not include the component stack ("The above error occurred").
The error is catchable and does include the component stack i.e. React 16 behavior.
I understand that the cleanup is now async but it's still flushed in act() so I would expect that an error thrown is catchable.
Originally reported in testing-library/react-testing-library#874
The text was updated successfully, but these errors were encountered:
Added some tests to ReactTestUtilsAct and realized this already covered by skipUnmountedBoundaries
ReactTestUtilsAct
skipUnmountedBoundaries
Tests for react-dom/test-utils are added in master...eps1lon:fix/act-cleanup-propagation but the same behavior is already covered in the noop renderer
react-dom/test-utils
Sorry, something went wrong.
Fixed with #23322 Confirmation (notice the caught error during unmount): https://codesandbox.io/s/react-18-throw-in-effect-destory-forked-ce0j2u?file=/src/index.js
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
React version: 17.0.1
TL;DR: Fixed with
skipUnmountedBoundaries = true
Steps To Reproduce
act()
Link to code example:
React 16
React 17
I also tested it locally and jest and couldn't catch the error as well.
The current behavior
The error is uncatchable and does not include the component stack ("The above error occurred").
The expected behavior
The error is catchable and does include the component stack i.e. React 16 behavior.
Context
I understand that the cleanup is now async but it's still flushed in
act()
so I would expect that an error thrown is catchable.Originally reported in testing-library/react-testing-library#874
The text was updated successfully, but these errors were encountered: