react-act
v1.0.1
Published
A way to avoid calling `act()` when testing React hooks.
Downloads
214
Readme
React Act
A way to avoid calling act()
when testing React hooks.
Installation
npm i react-act
Usage
import 'react-act'
// write your tests without having to call `act()`
Important note
This library is a temporary workaround while waiting for atc()
to support async actions. Its implementation forces changes to be synchronous, which is not how React behave on browser.
How? and Why?
Check this article to know why and how did I create this.
Contributing
Feel free to open issues or submit Pull requests :D