Unhelpful warning for `act` for react-dom@16.8
Problem
*Do you want to request a feature or report a bug? Feature/Improvement What is the current behavior? If there is test code that should be wrapped in `act(...)` then the current warning is given: [code block] When upgrading a large code base, this is basically useless. What is the expected behavior? Provide at least the test name if not the line number of code that triggered the warning. Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?* react@16.8.0 react-dom@16.8.0
Error Output
error node_modules/react-dom/cjs/react-dom.development.js:506
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Unhelpful warning for `act` for react-dom@16.8
We're using `jest` with `react-testing-library`. I'll try to carve out some time later to get repro.
Trust Score
6 verifications
- 1
We're using `jest` with `react-testing-library`.
We're using `jest` with `react-testing-library`.
- 2
I'll try to carve out some time later to get repro.
I'll try to carve out some time later to get repro.
Validation
Resolved in facebook/react GitHub issue #14769. Community reactions: 25 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep