-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Getting type errors after upgrading to @types/react v18.0.0. #5250
Comments
Can confirm, this is definitely happening for the |
I'm also seeing this type error on tooltips from Popover2. Here's some guidance from the React team on how to fix: https://twitter.com/dan_abramov/status/1512833611401150474 |
Ok, thanks for the flag. The solution seems to be that we have to manually declare Rationale on why they removed the I'll get to this eventually, but gladly open to PRs in the meantime... Edit: here's a Blueprint code sandbox using React 18, useful for testing which components get type errors. |
Does anyone have a reasonable workaround for this? This is preventing my update to React 18. |
Unfortunately, the only current solution as of this post is to not update |
Thanks for the very quick fix @adidahiya! EDIT: I noticed this was still an issue on class components, so I've opened a PR that addresses one such issue for Popover2/Tooltip2: #5261 |
Not sure whether this is part of this bug, or is expected, or should be something else - but if I add an example use of
(added to the sample sandbox above here: https://codesandbox.io/s/blueprint-sandbox-with-react-18-tabs-example-dvnk04?file=/src/TabsExample.tsx:179-494 ) then I get a compile error:
Oddly (to me at least!), I can persuade the compiler to accept it by wrapping the spread again:
so it looks like it's that it won't handle any override properties in the tag syntax. EDIT: I wonder if the fix is to add
|
Can confirm, this is definitely happening for the Collapse, FormGroup components. |
This is still happening for the
|
also |
Also in the |
Still seeing an error on the Spinner component:
|
I created a new Blueprint sandbox with React 18, check it out: https://codesandbox.io/s/blueprint-with-react-18-2wfvt5?file=/src/CoreExample.tsx @switz I don't see any errors when using |
I am seeing something similar. -
Not sure how I can fix this error. |
@puthrayaharness can you please file a new issue? it should be possible to create a code sandbox repro for that kind of compile error. |
I upgraded react and @types/react packages to the new v18.0.0 yesterday and I started to get type errors in regards to the removed "children" prop in @types/react version 18.0.0.
Can you please apply a fix for this?
Thanks
The text was updated successfully, but these errors were encountered: