Sveriges mest populära poddar
The Call Kent Podcast

Dealing with "act" warning on react testing

6 min3 september 2021

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

Fler avsnitt av The Call Kent Podcast

Visa alla avsnitt av The Call Kent Podcast

The Call Kent Podcast med Kent C. Dodds finns tillgänglig på flera plattformar. Informationen på denna sida kommer från offentliga podd-flöden.