Skip to content
Discussion options

You must be logged in to vote

Good afternoon. This may be related to a version mismatch between React and React Testing Library.

A few things worth checking:

  1. Make sure you're using @testing-library/react v16.1.0 or later, which introduced React 19 support.

  2. Check that react and react-dom are both installed at compatible versions. Ideally, they should use the same React version.

  3. If you're using React Testing Library v16, make sure @testing-library/dom is installed as well.

  4. Check whether your package manager has installed multiple versions of React. You can inspect this with:

    pnpm list react react-dom @testing-library/react @testing-library/dom

Could you share the versions of these packages from your project? I…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by snowystinger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants