Relative Content

Tag Archive for ts-jestreact-tsx

is there an alternate way of using the waitfornextupdate function from the react-hooks library in react 18

so i was working on a jest test file that is testing a hook that deals with session management and the project has moved forward to react 18 which made the testing library, react-hooks, deprecated. I went ahead and checked the deprecated library and it said that in transition to react 18 that some features were moved to the official testing library of react 18 but the one function that i actively used in my test file and is not available right now, is the waitfornextupdate function. Due to this missing function, my test file has failed many tests and i am wondering if there is alternative option to make my test file work.