Skip to content
Discussion options

You must be logged in to vote

Whenever you submit a form, remix will refetch all loaders to revalidate the data. This keeps all the UI data in your nested components fresh. The flow is:

  1. Form is submitted
  2. Action has finished with redirect on success and response with an error
  3. all Loaders are called to refresh your data

In your case, you will set error/success in the action and want to know this in a loader. You can use sessions for this. Store the information in a sessionCookie and read it in a loader / route to render your toast.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@t-blackwell
Comment options

Answer selected by t-blackwell
Comment options

You must be logged in to vote
4 replies
@ccssmnn
Comment options

@kwiat1990
Comment options

@ccssmnn
Comment options

@kwiat1990
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants