-
I have a route that includes a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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
When navigating to |
Beta Was this translation helpful? Give feedback.
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
When navigating to
/parent/child
URL this will match both routes so Remix will send a req…