You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parent clientLoader should always revalidate when its child route is changed, without setting shouldRevalidate = () => true;
Actual Behavior
In the repro, v7.1.5 is set and for that version, the parent clientLoader revalidates when the child route is changed by clicking on one of the links in the parent component, so the selected link which is set in the parent clientLoader can also change
In later versions, the parent clientLoader only revalidates when shouldRevalidate is explicitly set to true shouldRevalidate = () => true;
This is happening when ssr: false
The text was updated successfully, but these errors were encountered:
This is expected behavior for "SPA Mode" apps and matches the original pre-Single-Fetch behavior for revalidations, where routes only revalidate if their params change or after a submission. A GET navigation between child routes should not be mutating any data so the loader should not need to re-run by default.
The behavior in 7.00 -> 7.1.5 was incorrect because the "single fetch" de-optimization of revalidating reused loaders on GET navigations was being incorrectly applied to SPA mode where there is no running server, and thus no "single fetch" HTTP call to make. We fixed this and removed the de-optimization for SPA Mode apps in 7.2.0 via #12948.
I'm using React Router as a...
framework
Reproduction
stackblitz repro
System Info
Used Package Manager
pnpm
Expected Behavior
The parent clientLoader should always revalidate when its child route is changed, without setting
shouldRevalidate = () => true;
Actual Behavior
In the repro, v7.1.5 is set and for that version, the parent clientLoader revalidates when the child route is changed by clicking on one of the links in the parent component, so the selected link which is set in the parent clientLoader can also change
In later versions, the parent clientLoader only revalidates when shouldRevalidate is explicitly set to true
shouldRevalidate = () => true;
This is happening when
ssr: false
The text was updated successfully, but these errors were encountered: