Skip to content
Discussion options

You must be logged in to vote

If the user navigates to a URL that match two routes it will trigger a fetch to the loaders for every matching route.

If one of those matching routes have a clientLoader it will skip the request to the loader of that route and instead run the clientLoader, but the parent route server loader will still be requested.

For the route with both loader and clientLoader to get the loader to run you need to call the serverLoader function in the clientLoader.

This means that if you have these routes

app/routes/parent.tsx <- this has a loader
app/routes/parent.child.tsx <- this has both loader and clientLoader

When navigating to /parent/child URL this will match both routes so Remix will send a req…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by wong2
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