Skip to content

Commit 215c9ca

Browse files
committed
Removed redundant form state
Also renamed to Shell to match other navigation rsc examples
1 parent d001dc0 commit 215c9ca

File tree

1 file changed

+3
-3
lines changed
  • packages/plugin-rsc/examples/navigation/src

1 file changed

+3
-3
lines changed

packages/plugin-rsc/examples/navigation/src/client.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import { BundlerContext } from 'navigation-react';
1313
//#region src/extra/browser.tsx
1414
async function hydrate() {
1515
const initialPayload = await createFromReadableStream(rscStream);
16-
function BrowserRoot() {
16+
function Shell() {
1717
const [payload, setPayload_] = React.useState(initialPayload);
1818
const bundler = React.useMemo(() => ({setRoot: setPayload_, deserialize: fetchRSC}), []);
1919
return jsx(BundlerContext.Provider, { value: bundler, children: payload.root });
2020
}
21-
const browserRoot = /* @__PURE__ */ jsx(React.StrictMode, { children: /* @__PURE__ */ jsx(BrowserRoot, {}) });
22-
ReactDomClient.hydrateRoot(document, browserRoot, { formState: initialPayload.formState });
21+
const browserRoot = /* @__PURE__ */ jsx(React.StrictMode, { children: /* @__PURE__ */ jsx(Shell, {}) });
22+
ReactDomClient.hydrateRoot(document, browserRoot);
2323
}
2424
async function fetchRSC(request: any) {
2525
const payload = await createFromFetch(fetch(request));

0 commit comments

Comments
 (0)