Skip to content
Discussion options

You must be logged in to vote

Remix is actually working as designed. The issue is that you're displaying the flash message in a common parent route.

When route a submits and redirects to b, Remix will revalidate the loaders. This will fetch from container route and render the global message. When you navigate from b back to a, the container route is still a common parent route, so Remix will not refetch the data, nor will it re-render.

The rule of thumb is don't render anything in parent routes that you expect to change when simply navigating in common child routes.

You need something that will trigger the parent to re-render.

In this sample, I'm using useLocation to check every time the route changes, and only displa…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gavriguy
Comment options

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