File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,11 @@ export async function hydrate(
3131  const  Initial  =  await  import ( matched . value ) ; 
3232  return  hydrateRoot ( 
3333    document , 
34-     < RouterHost  Shell = { Shell }  { ...options } > 
34+     < RouterHost 
35+       Shell = { Shell } 
36+       staticProps = { globalX . __STATIC_PROPS__ } 
37+       { ...options } 
38+     > 
3539      < Shell 
3640        route = { globalX . __INITIAL_ROUTE__ } 
3741        { ...globalX . __STATIC_PROPS__ } 
Original file line number Diff line number Diff line change @@ -106,11 +106,13 @@ export const RouterHost = ({
106106  normalizeUrl =  ( url : string )  =>  url , 
107107  Shell, 
108108  onRouteUpdated, 
109+   staticProps, 
109110} : { 
110111  children : React . ReactElement ; 
111112  normalizeUrl ?: ( url : string )  =>  string ; 
112113  Shell : React . ComponentType < {  children : React . ReactElement ;  route ?: string  } > ; 
113114  onRouteUpdated ?: ( path : string )  =>  void ; 
115+   staticProps ?: Record < string ,  unknown > ; 
114116} )  =>  { 
115117  const  pathname  =  useLocationProperty ( 
116118    ( )  =>  normalizeUrl ( location . pathname  +  location . search ) , 
@@ -135,7 +137,7 @@ export const RouterHost = ({
135137            onRouteUpdated ?.( target ) ; 
136138            setVersion ( currentVersion ) ; 
137139            setCurrent ( 
138-               < Shell  route = { target }  { ...props } > 
140+               < Shell  route = { target }  { ...staticProps }   { ... props } > 
139141                < module . default  { ...props ?. props }  /> 
140142              </ Shell > 
141143            ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments