-
Notifications
You must be signed in to change notification settings - Fork 410
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
Typescript warning with React 18 types #826
Comments
It would help if you included the actual warning. I assuming its the same thing I'm getting:
Although that is an error, not a warning (not sure Typescript even has warnings). |
Is there any workaround for this? |
@Timmmm . Yes, that's the message and you are correct that it's an error. I fixed this by forking and adding children: React.ReactNode; to SplitPaneProps in index.d.ts. @johnflux I don't know of any workarounds but you could ignore using the react syntax below. (Note - it's 2 lines and will then ignore ALL typescript errors for SplitPane)
|
Yeah I also just used |
Faced with the same issue, here is an example that I've found https://codesandbox.io/s/wr0gf |
Here's the react 18 doc reference, |
So nobody is going to fix this small issue ? |
facing similar issue |
Found solution |
Describe the bug
When using with @types/react": "^18.0.15 a typescript warning is produced.
This is easily resolved by adding to the Props definition.
children: React.ReactNode; // 👈️ added type for children
The text was updated successfully, but these errors were encountered: