Layout clientLoader is called on every URL change in SSR: false
(SPA mode)
#10459
-
In my Remix project with What I would expect was the loader function was called a single time on the initial rendering of the layout. Like it does using plain react router. I created two projects that should be somewhat identical but with remix and react router. If you see the logs you would see 👈 React Router | Remix 👉
I have a repo where you can recreate it :) Hope it makes sense - thanks for Remix and React Router💙 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
export const shouldRevalidate: ShouldRevalidateFunction = () => false;
was the solution :)