Dealing with "act" warning on react testing

03/09/2021 6 min Temporada 1 Episodio 2
Dealing with "act" warning on react testing

Listen "Dealing with "act" warning on react testing"

Episode Synopsis


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