React Jest Purpose of Act wrapper inside fireEvents

27 views Asked by At

Im working on, on some tests using Jest and fireEvents from react testing library and i came across with this in the docs act wrapper.

I cant understand why events need to be in an act wrapper.

What is the purpose of an act inside there? Can someone provide a simple example?

Thanks

0

There are 0 answers