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

React 19 Support? #4613

Open
abubakriz opened this issue Dec 19, 2024 · 4 comments
Open

React 19 Support? #4613

abubakriz opened this issue Dec 19, 2024 · 4 comments

Comments

@abubakriz
Copy link

Certain features from React 19 like useActionState and more currently do not work and therefore it is impossible to alias a react 19 project to preact

@JoviDeCroock
Copy link
Member

JoviDeCroock commented Dec 19, 2024

That depends on whether or not you use these API's, what particular use case are you seeking to fill with useActionState that is outside of server-components/...? React 19 hasn't been out for long and we are still in conversations about the merit of some of these hooks

@bcomnes
Copy link

bcomnes commented Dec 19, 2024

Are function refs with cleanup supported in preact?

@rschristian
Copy link
Member

Yes, that landed in #4436

@abubakriz
Copy link
Author

abubakriz commented Dec 22, 2024

That depends on whether or not you use these API's, what particular use case are you seeking to fill with useActionState that is outside of server-components/...? React 19 hasn't been out for long and we are still in conversations about the merit of some of these hooks

useActionState is particulary useful, it eliminates a lot of boilerplate when it comes to form submission. It's true that you can do everything it does with the already existing hooks, but it's a lot cleaner IMO, and i've dropped libraries like react hook form thanks to it, (which also reduced my bundle size lol)

But most importantly, to me, preact has always been a tool that I can use as an alias for react to reduce my bundle size and improve my web app's experience, it would be a shame if that were not the case anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants