File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/plugin-rsc/examples/navigation/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ import { BundlerContext } from 'navigation-react';
1313//#region src/extra/browser.tsx
1414async 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}
2424async function fetchRSC ( request : any ) {
2525 const payload = await createFromFetch ( fetch ( request ) ) ;
You can’t perform that action at this time.
0 commit comments