Skip to content
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

Adds support for react 19 #4623

Merged
merged 3 commits into from
Jan 7, 2025
Merged

Adds support for react 19 #4623

merged 3 commits into from
Jan 7, 2025

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Dec 29, 2024

Forwarding refs by default would be a breaking change so I've opted to add an additional entrypoint where we can export relevant pieces. This uses the existing _forwarded property to move the ref from the vnode back to props, if the user opts to leverage forwardRef all we'll do is move it to the second argument.

Alongside Context as component and our existing ref cleanup functions. We are only missing the newly added use and useActionState hooks for React 19 support, which could be exported from the new entrypoint without causing inflated bundles. In a future major version we can cut back on exports though, SuspenseList and others are basically scrapped from React.

Relates to #4613
Relates to #4618

@coveralls
Copy link

coveralls commented Dec 29, 2024

Coverage Status

coverage: 99.616%. remained the same
when pulling 5a5e24e on support-react-19
into df1f20d on main.

@JoviDeCroock JoviDeCroock merged commit a1ff5f3 into main Jan 7, 2025
5 checks passed
@JoviDeCroock JoviDeCroock deleted the support-react-19 branch January 7, 2025 09:08
@rschristian rschristian mentioned this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants