Skip to content

Typings for v13.0.0 are broken #1039

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Nokel81 opened this issue Apr 11, 2022 · 0 comments · Fixed by #1040
Closed

Typings for v13.0.0 are broken #1039

Nokel81 opened this issue Apr 11, 2022 · 0 comments · Fixed by #1040

Comments

@Nokel81
Copy link
Contributor

Nokel81 commented Apr 11, 2022

  • @testing-library/react version: ^13.0.0
  • Testing Framework and version: N/A
  • DOM Environment: N/A

Relevant code or config:

{
  "dependencies": {
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
  },
  "devDependencies": {
    "@testing-library/react": "^13.0.0",
    "@types/react": "^18.0.1",
    "@types/react-dom": "^18.0.0",
  }
}

Problem description:

I have installed the above config and then ran yarn and the version that yarn picks for the @types/react-dom package for @testing-libary/react is v17.X.Y because it is specified as * in your config, which breaks the use of React.Fragment since in react 18 the {} was added to the type of fragment. This also breaks React.ReactPortal typings.

Suggested solution:

Specify ^18.0.0 as the typings version.

Nokel81 added a commit to Nokel81/react-testing-library that referenced this issue Apr 11, 2022
eps1lon added a commit that referenced this issue Apr 11, 2022
fixes #1039

Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
xbucks pushed a commit to xbucks/tauri-crypto-trading that referenced this issue Oct 15, 2023
fixes testing-library/react-testing-library#1039

Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant