Replies: 1 comment 1 reply
-
OK so it seems that parent loaders aren't called unless there is a mutation for the current parent route. So perhaps this is the issue? After a movie is edited, the flash is retrieved by the loader.... but then that state (with the flash value present) is never cleared unless you change route entirely or cause a mutation? If so, any suggestions for displaying flash in a global location? Or is it too tricky with remix caches/nesting? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having issues getting Flash messaging to work in a layout.
In this repo I've done a
session.get
in the root, as a universal spot to show any flash error messages.Problem is, the session flash does not clear. It persists.
If I move the
session.get
from the root layout to a lower layout (like "movie"), it's the same issue. It only seems to work if I put it inside a route endpoint likeroutes/movie.index
?Any suggestions on how to get the Flash display to work (and clear) from a universal location?
Thanks 😊
The repo is just a plain remix install.
It uses app/sessions.ts from the docs.
With these two files the main difference:
/app/root.tsx
app/routes/movie.$movieId.edit.tsx
Beta Was this translation helpful? Give feedback.
All reactions