testing-library/react-hooks-testing-library

Migration to react 18

mod7ex opened this issue · 2 comments

when working with the library in a react 18 project i keep getting this warnings in the console

Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot

I just want to know if it (react 18) will be supported in the future in next versions

Looks like this lib is been deprecated due to the merge with testing-library, but there is a PR to make it compatible with react 18, either way I guess the way is just migrate to react-testing-library renderHook, and this migration guide may help https://github.com/testing-library/react-hooks-testing-library/blob/chore/migration-guide/MIGRATION_GUIDE.md

when working with the library in a React 18 project i keep getting these warnings in the console

What changes should be done to render is not working after upgrading to React 18.

return render(

<Route path="/:page/page/*" element={} />
,
{ wrapper: WrapperWithRouter, ...options }
);

Do you know how I can change this?

Your help is much appreciated 

I appreciate any help you can provide.