-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@types/styled-componets not block @types/react version #3721
Comments
my react and react-dom version is 16.9.0, not ready to upgrade react@18 |
I'm getting the same error! Seems like styled-components ReactNode overwrites React.ReactNode type. Please help me figure out how to fix this. Error shown below: No overload matches this call. |
This is an issue with
|
if use npm, maybe should move @types/react to dependencies after set resolutions not fix set it: issue thx, fix me |
Environment
npx envinfo --system --binaries --npmPackages styled-components,babel-plugin-styled-components --markdown --clipboard
System:
Binaries:
npmPackages:
Reproduction
https://codesandbox.io/s/styled-components-base-gc367
Steps to reproduce
npx react-app-rewired build
tsc throw an error: Type 'ReactElement<any, string | JSXElementConstructor>' is not assignable to type 'ReactNode'
node_modules/@types/styled-components/node_modules/@types/react/package.json version is 18.0.0
@types/styled-components dependencies: "@types/hoist-non-react-statics": "",
"@types/react": "",
Is @types/react v18 has break change, but @types/styled-components not block that version?
Expected Behavior
build success
Actual Behavior
build error
The text was updated successfully, but these errors were encountered: