Skip to content

Commit 3f0dc13

Browse files
fix: fix loading state of flag
[dev] [Marfuen] mariano/fix-framework-update-status-stale-cache
1 parent e48e528 commit 3f0dc13

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

apps/app/src/hooks/use-framework-update-status.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ export function useFrameworkUpdateStatus(
2727
},
2828
{
2929
fallbackData: options?.fallbackData,
30-
revalidateOnMount: !options?.fallbackData,
30+
// Always revalidate on mount, even when fallbackData is provided.
31+
// fallbackData is only a fast first paint — without this, SWR treats
32+
// the server-rendered snapshot as authoritative forever and skips the
33+
// client fetch, so users don't see newly-available upgrades after the
34+
// feature flag is flipped, after a sync on a sibling framework, or
35+
// whenever the Next.js router cache serves a stale RSC. Short of
36+
// signing out and back in.
37+
revalidateOnMount: true,
3138
revalidateOnFocus: true,
3239
},
3340
);

0 commit comments

Comments
 (0)