Skip to content

act cannot detect secondary updates #14775

Closed
@pshrmn

Description

@pshrmn

Do you want to request a feature or report a bug?

bug

What is the current behavior?

If a component performs a second (non user triggered) update, act cannot detect it and warns about the update.

For example, a button is clicked and updates its text. After a second, the button resets and its text reverts to its original state.

https://codesandbox.io/s/6xkyl37x7k?previewwindow=tests

(The reproduction is a bit contrived, but demonstrates the issue.)

What is the expected behavior?

The test runs without warning about being wrapped in act.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React & React DOM @ 16.8.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions