-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
feat!: React 19 support #2349
base: next
Are you sure you want to change the base?
feat!: React 19 support #2349
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const host = createHost(primitives, { | ||
// @ts-expect-error r3f related | ||
applyAnimatedValues: applyProps, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a proxy since it is valid to extend
the JSX interface beyond what the THREE
namespace contains.
This used to be pulled in by R3F, but we vendor it upstream as of late. Even though we intend to later migrate changes, it's best to not depend on transient dependencies.
Why
Adds support for React 19 and R3F v9.
What
Upstream breaking changes are limited to types, and I opt to remove deprecated patterns where able:
MutableRefObject<T>
->RefObject<T>
useRef<T>()
->useRef<T>(null)
JSX
->React.JSX
PropsWithRef<T>
->T
JSX.IntrinsicElements
->ThreeElements
(see review comment)Checklist