Open
Description
This issue was first created in facebook/react, see facebook/react#24854.
The rational behind why we want to disable act warnings: facebook/react#23197
Potentially related to using jest. Didn't confirm.
React version: 18.2.0
Steps To Reproduce
- Clone https://github.com/anilanar/react-18-act-env ; which is a
create-react-app
with an adjustment toApp
component to trigger an asyncsetState
and an adjustment to the test to wait for that async state update. npm install
npm test -- --watchAll
The current behavior
It logs Warning: An update to App inside a test was not wrapped in act(...).
The expected behavior
It does not log that warning.