Support React 18.3
christopherschroer opened this issue · comments
Describe the feature you'd like:
I would like react-testing-library to support the newly released React 18.3. According to react.dev:
To help make the upgrade to React 19 easier, we’ve published a react@18.3 release that is identical to 18.2 but adds warnings for deprecated APIs and other changes that are needed for React 19.
We recommend upgrading to React 18.3 first to help identify any issues before upgrading to React 19.
For a list of changes in 18.3 see the Release Notes.
Suggested implementation:
React.dev provides an upgrade guide for React 19 Beta here. I would suggest reviewing it and implementing applicable changes as part of supporting React 18.3/19.
One of the changes that is causing warnings to be logged concerns the act
function
https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-react-dom-test-utils
Describe alternatives you've considered:
Not upgrading to React 18.3 yet in order to keep test logs clean
Teachability, Documentation, Adoption, Migration Strategy:
Following the above upgrade guide as needed
This is a bug in react 18.3 facebook/react#28915
Act change is already implemented in testing library
Thanks for reporting this. I'm closing in favor of facebook/react#28915 as we already implemented this as @ambar-arkin mentioned.