-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Description
I know RSC is still unstable_ -- this is just for tracking, not a demand for immediate action.
The non-RSC framework mode detects version mismatches via X-Remix-Reload-Document on /__manifest requests and triggers a full page reload with sessionStorage loop prevention (added in #13061). The RSC code path has none of this.
When a new deployment happens while a user has a stale client loaded, any client-side navigation fetches an RSC stream the old client can't decode. createFromReadableStream fails and the catch block at dom-export.js:632 throws the generic "Unable to decode RSC response" -- no recovery, no reload, just a broken page.
The RSC fetchAndApplyManifestPatches (dom-export.js:880-908) doesn't send a version param or check for X-Remix-Reload-Document. The manifest has a hardcoded version: "1".
We're working around this by passing a custom fetch to RSCHydratedRouter and createCallServer that adds a version header, and checking it server-side. It works, but it's the kind of thing that should live in the framework.
For reference, the non-RSC mode already handles this well -- it would be great to see the same treatment for RSC navigations, manifest patches, and server actions.