You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having difficulties with the redirect methods. I am unable to get the data needed to display my toast. However, when I use jsonWithSuccess, I can. If there was a way to also include a redirect URL, I would continue to use it, but I cannot.
I have tested the following within my action function:
With the latter, the redirect works as expected. However, I can't get my toast to work like the jsonWithSuccess implementation. It is my understanding that my root loader data would also include it, but when I use the redirect methods, that is not the case.
I just looked at your repro and if you change the root to use getToast from remix-toast it works as expected. Are you throwing your redirect or returning it? IF you throw the redirect it has to be awaited, eg throw await redirectWithSuccess
I am having difficulties with the redirect methods. I am unable to get the data needed to display my toast. However, when I use jsonWithSuccess, I can. If there was a way to also include a redirect URL, I would continue to use it, but I cannot.
I have tested the following within my action function:
And
With the latter, the redirect works as expected. However, I can't get my toast to work like the jsonWithSuccess implementation. It is my understanding that my root loader data would also include it, but when I use the redirect methods, that is not the case.
root.tsx
I was able to reproduce this in the test-app:
import { redirectWithError } from "~/toast";
toimport { redirectWithError } from "remix-toast";
Click Me
Lastly, I tried implementing
~/toast
into my app with no success.The text was updated successfully, but these errors were encountered: