The Call Kent Podcast
The Call Kent Podcast
Kent C. Dodds
Dealing with "act" warning on react testing
6 minutes Posted Sep 3, 2021 at 5:28 pm.
0:00
6:20
Download MP3
Show notes

So I have a MainComponent, inside there are some “remote” components like OfficeSelect, that fetches data asynchronously on mount, using axios, everytime I test MainComponent I get the “act” warning on that OfficeSelect fetch, how do I deal with that?

Fix the “not wrapped in act(…)” warning