Closed
Description
@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.
Metadata
Metadata
Assignees
Labels
No labels