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
toast.loading() not working with nextjs 14 #324
Comments
It seems that this project has been abandoned. Here is a minimal reproduction that there is a difference between triggering by click and form action when using I tested that this is a problem only when using https://codesandbox.io/p/devbox/reac-hot-toast-test-lz39vl?file=/app/page.tsx |
Not abandoned: #298 |
Could you use As far as i'm aware you'd usually only use server actions in nextjs, i don't see why you'd need client actions. |
Hi there, thanks for releasing this amazing product!
I would like to use it in my nextjs project and I'm running into a few issues with
toast.promise()
andtoast.loading()
.I am trying to disable a submit button -> show loading toast -> await my action -> show success (or error). Which would be the expected behaviour, however, I only get the loading toast only the second time I click the button. The success toast is more consistent.
Please have look at MauricioKruijer/nextjs-react-hot-toast@fb8db5a for more information. You can run this project to experience what I'm talking about.
There is an extract of my form that is trying to render the toast by using
useFormState()
The text was updated successfully, but these errors were encountered: