-
Notifications
You must be signed in to change notification settings - Fork 47k
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] Can't use useActionState (NextJS) #29017
Comments
Next vendors React so you can't install your own version of React, it forces you to use the vendor version. Next will add React 19 to a future release. |
I completely understand the confusion as I received the same error today. This is a little bit misleading as nextjs uses these functions without any context in the examples https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations#examples Or am I missing something? @fernandortec you can use actions
form component
|
|
have you found a solution? Next makes me use useActionState which is literally nowhere to be found in my 'react' folder. I have version 19.0.0 of react with the latest version of next.js but nothing works. |
I am also in the same state and cannot use "useActionState" hook, I am trying to find out alternate solution.I don't know why they have mentioned this and not tested its working with nextjs 14 |
This worked and the build passed. However it results in this error during development
|
Is there any approx release date for React 19 and Next.js allowing to use |
does react 19 RC comes with |
Yes,
Regards,
Ghulam Abbas
On 05-Sep-2024, at 8:19 AM, Alexandre ***@***.***> wrote:
does react 19 RC comes with useActionState ?
—
Reply to this email directly, view it on GitHub<#29017 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOHOERA2HNPAQS34U4GDM6TZU7ESNAVCNFSM6AAAAABHLU3P66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZQGUYTMOJXG4>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Run the following command to install the good version of react and react-dom canary, who support useActionState hook with Next JS server action : |
I get this error, trying to useActionState in React19 and NextJS, I followed the documentation and tried using several approaches, but none worked, here's the code and the React Version below
"react": "^19.0.0-beta-e7d213dfb0-20240507", "react-dom": "^19.0.0-beta-1beb73de0f-20240503",
The text was updated successfully, but these errors were encountered: