We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e83668 commit 4de6220Copy full SHA for 4de6220
unstable_rsc-vite/src/entry.browser.tsx
@@ -11,6 +11,7 @@ import {
11
unstable_getRSCStream as getRSCStream,
12
unstable_RSCHydratedRouter as RSCHydratedRouter,
13
type unstable_RSCPayload as RSCServerPayload,
14
+ type DataRouter,
15
} from "react-router";
16
17
// Create and set the callServer function to support post-hydration server actions.
@@ -43,3 +44,9 @@ createFromReadableStream<RSCServerPayload>(getRSCStream()).then((payload) => {
43
44
);
45
});
46
47
+
48
+if (import.meta.hot) {
49
+ import.meta.hot.on("rsc:update", () => {
50
+ (window as unknown as { __router: DataRouter }).__router.revalidate();
51
+ });
52
+}
0 commit comments