File tree 2 files changed +8
-2
lines changed
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(
31
31
const Initial = await import ( matched . value ) ;
32
32
return hydrateRoot (
33
33
document ,
34
- < RouterHost Shell = { Shell } { ...options } >
34
+ < RouterHost
35
+ Shell = { Shell }
36
+ staticProps = { globalX . __STATIC_PROPS__ }
37
+ { ...options }
38
+ >
35
39
< Shell
36
40
route = { globalX . __INITIAL_ROUTE__ }
37
41
{ ...globalX . __STATIC_PROPS__ }
Original file line number Diff line number Diff line change @@ -106,11 +106,13 @@ export const RouterHost = ({
106
106
normalizeUrl = ( url : string ) => url ,
107
107
Shell,
108
108
onRouteUpdated,
109
+ staticProps,
109
110
} : {
110
111
children : React . ReactElement ;
111
112
normalizeUrl ?: ( url : string ) => string ;
112
113
Shell : React . ComponentType < { children : React . ReactElement ; route ?: string } > ;
113
114
onRouteUpdated ?: ( path : string ) => void ;
115
+ staticProps ?: Record < string , unknown > ;
114
116
} ) => {
115
117
const pathname = useLocationProperty (
116
118
( ) => normalizeUrl ( location . pathname + location . search ) ,
@@ -135,7 +137,7 @@ export const RouterHost = ({
135
137
onRouteUpdated ?.( target ) ;
136
138
setVersion ( currentVersion ) ;
137
139
setCurrent (
138
- < Shell route = { target } { ...props } >
140
+ < Shell route = { target } { ...staticProps } { ... props } >
139
141
< module . default { ...props ?. props } />
140
142
</ Shell >
141
143
) ;
You can’t perform that action at this time.
0 commit comments