File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed 
packages/plugin-rsc/examples/navigation/src Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,21 @@ import { createFromFetch, createFromReadableStream } from "@vitejs/plugin-rsc/br
55import  "@vitejs/plugin-rsc/browser-LizIyxet" ; 
66// @ts -ignore 
77import  {  rscStream  }  from  "@vitejs/plugin-rsc/client-edAdk2GF" ; 
8- import  React  from  "react" ; 
8+ import  {   useState ,   useMemo ,   StrictMode   }  from  "react" ; 
99import  ReactDomClient  from  "react-dom/client" ; 
1010import  {  BundlerContext  }  from  'navigation-react' ; 
1111
1212async  function  hydrate ( )  { 
1313    const  initialPayload  =  await  createFromReadableStream ( rscStream ) ; 
1414    function  Shell ( )  { 
15-         const  [ payload ,  setPayload ]  =  React . useState ( initialPayload ) ; 
16-         const  bundler  =  React . useMemo ( ( )  =>  ( { setRoot : setPayload ,  deserialize : fetchRSC } ) ,  [ ] ) ; 
15+         const  [ payload ,  setPayload ]  =  useState ( initialPayload ) ; 
16+         const  bundler  =  useMemo ( ( )  =>  ( { setRoot : setPayload ,  deserialize : fetchRSC } ) ,  [ ] ) ; 
1717        return  ( 
18-             < React . StrictMode > 
18+             < StrictMode > 
1919                < BundlerContext . Provider  value = { bundler } > 
2020                    { payload . root } 
2121                </ BundlerContext . Provider > 
22-             </ React . StrictMode > 
22+             </ StrictMode > 
2323        ) ; 
2424    } 
2525    ReactDomClient . hydrateRoot ( document ,  < Shell  /> ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments