@tanstack/react-router 0.0.1-beta.192 → 0.0.1-beta.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/react.js +2 -14
- package/build/cjs/react.js.map +1 -1
- package/build/esm/index.js +2 -14
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +98 -98
- package/build/types/react.d.ts +28 -30
- package/build/umd/index.development.js +31 -32
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/react.tsx +73 -105
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-router",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "0.0.1-beta.
|
|
4
|
+
"version": "0.0.1-beta.194",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "tanstack/router",
|
|
7
7
|
"homepage": "https://tanstack.com/router",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"tiny-warning": "^1.0.3",
|
|
45
45
|
"@tanstack/react-store": "^0.0.1",
|
|
46
46
|
"@gisatcz/cross-package-react-context": "^0.2.0",
|
|
47
|
-
"@tanstack/router-core": "0.0.1-beta.
|
|
47
|
+
"@tanstack/router-core": "0.0.1-beta.194"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "rollup --config rollup.config.js"
|
package/src/react.tsx
CHANGED
|
@@ -39,6 +39,8 @@ import {
|
|
|
39
39
|
AnyPathParams,
|
|
40
40
|
Expand,
|
|
41
41
|
ResolveAllParams,
|
|
42
|
+
DeepMergeAll,
|
|
43
|
+
IsAny,
|
|
42
44
|
} from '@tanstack/router-core'
|
|
43
45
|
|
|
44
46
|
declare module '@tanstack/router-core' {
|
|
@@ -54,10 +56,10 @@ declare module '@tanstack/router-core' {
|
|
|
54
56
|
|
|
55
57
|
interface RegisterRouteComponent<
|
|
56
58
|
TLoader = unknown,
|
|
57
|
-
TFullSearchSchema extends
|
|
59
|
+
TFullSearchSchema extends Record<string, any> = AnySearchSchema,
|
|
58
60
|
TAllParams extends AnyPathParams = AnyPathParams,
|
|
59
|
-
TRouteContext extends
|
|
60
|
-
TAllContext extends
|
|
61
|
+
TRouteContext extends Record<string, any> = AnyContext,
|
|
62
|
+
TAllContext extends Record<string, any> = AnyContext,
|
|
61
63
|
> {
|
|
62
64
|
RouteComponent: RouteComponent<
|
|
63
65
|
RouteProps<
|
|
@@ -71,10 +73,10 @@ declare module '@tanstack/router-core' {
|
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
interface RegisterErrorRouteComponent<
|
|
74
|
-
TFullSearchSchema extends
|
|
76
|
+
TFullSearchSchema extends Record<string, any> = AnySearchSchema,
|
|
75
77
|
TAllParams extends AnyPathParams = AnyPathParams,
|
|
76
|
-
TRouteContext extends
|
|
77
|
-
TAllContext extends
|
|
78
|
+
TRouteContext extends Record<string, any> = AnyContext,
|
|
79
|
+
TAllContext extends Record<string, any> = AnyContext,
|
|
78
80
|
> {
|
|
79
81
|
ErrorRouteComponent: RouteComponent<
|
|
80
82
|
ErrorRouteProps<TFullSearchSchema, TAllParams, TRouteContext, TAllContext>
|
|
@@ -82,10 +84,10 @@ declare module '@tanstack/router-core' {
|
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
interface RegisterPendingRouteComponent<
|
|
85
|
-
TFullSearchSchema extends
|
|
87
|
+
TFullSearchSchema extends Record<string, any> = AnySearchSchema,
|
|
86
88
|
TAllParams extends AnyPathParams = AnyPathParams,
|
|
87
|
-
TRouteContext extends
|
|
88
|
-
TAllContext extends
|
|
89
|
+
TRouteContext extends Record<string, any> = AnyContext,
|
|
90
|
+
TAllContext extends Record<string, any> = AnyContext,
|
|
89
91
|
> {
|
|
90
92
|
PendingRouteComponent: RouteComponent<
|
|
91
93
|
PendingRouteProps<
|
|
@@ -110,6 +112,7 @@ declare module '@tanstack/router-core' {
|
|
|
110
112
|
TCustomId,
|
|
111
113
|
TPath
|
|
112
114
|
>,
|
|
115
|
+
TLoaderContext extends RouteConstraints['TLoaderContext'] = AnyContext,
|
|
113
116
|
TLoader = unknown,
|
|
114
117
|
TSearchSchema extends RouteConstraints['TSearchSchema'] = {},
|
|
115
118
|
TFullSearchSchema extends RouteConstraints['TFullSearchSchema'] = ResolveFullSearchSchema<
|
|
@@ -123,12 +126,15 @@ declare module '@tanstack/router-core' {
|
|
|
123
126
|
TParentRoute,
|
|
124
127
|
TParams
|
|
125
128
|
>,
|
|
126
|
-
TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['types']['routeContext'],
|
|
127
|
-
TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['types']['context'],
|
|
128
129
|
TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext,
|
|
129
|
-
TAllContext extends RouteConstraints['TAllContext'] =
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
TAllContext extends RouteConstraints['TAllContext'] = Expand<
|
|
131
|
+
DeepMergeAll<
|
|
132
|
+
[
|
|
133
|
+
IsAny<TParentRoute['types']['context'], {}>,
|
|
134
|
+
TLoaderContext,
|
|
135
|
+
TRouteContext,
|
|
136
|
+
]
|
|
137
|
+
>
|
|
132
138
|
>,
|
|
133
139
|
TRouterContext extends RouteConstraints['TRouterContext'] = AnyContext,
|
|
134
140
|
TChildren extends RouteConstraints['TChildren'] = unknown,
|
|
@@ -140,12 +146,9 @@ declare module '@tanstack/router-core' {
|
|
|
140
146
|
useLoader: <TSelected = TLoader>(opts?: {
|
|
141
147
|
select?: (search: TLoader) => TSelected
|
|
142
148
|
}) => UseLoaderResult<TSelected>
|
|
143
|
-
|
|
149
|
+
useRouteContext: <TSelected = TAllContext>(opts?: {
|
|
144
150
|
select?: (search: TAllContext) => TSelected
|
|
145
151
|
}) => TSelected
|
|
146
|
-
useRouteContext: <TSelected = TRouteContext>(opts?: {
|
|
147
|
-
select?: (search: TRouteContext) => TSelected
|
|
148
|
-
}) => TSelected
|
|
149
152
|
useSearch: <TSelected = TFullSearchSchema>(opts?: {
|
|
150
153
|
select?: (search: TFullSearchSchema) => TSelected
|
|
151
154
|
}) => TSelected
|
|
@@ -156,10 +159,10 @@ declare module '@tanstack/router-core' {
|
|
|
156
159
|
|
|
157
160
|
interface RegisterRouteProps<
|
|
158
161
|
TLoader = unknown,
|
|
159
|
-
TFullSearchSchema extends
|
|
162
|
+
TFullSearchSchema extends Record<string, any> = AnySearchSchema,
|
|
160
163
|
TAllParams extends AnyPathParams = AnyPathParams,
|
|
161
|
-
TRouteContext extends
|
|
162
|
-
TAllContext extends
|
|
164
|
+
TRouteContext extends Record<string, any> = AnyContext,
|
|
165
|
+
TAllContext extends Record<string, any> = AnyContext,
|
|
163
166
|
> {
|
|
164
167
|
RouteProps: RouteProps<
|
|
165
168
|
TLoader,
|
|
@@ -171,10 +174,10 @@ declare module '@tanstack/router-core' {
|
|
|
171
174
|
}
|
|
172
175
|
|
|
173
176
|
interface RegisterPendingRouteProps<
|
|
174
|
-
TFullSearchSchema extends
|
|
177
|
+
TFullSearchSchema extends Record<string, any> = AnySearchSchema,
|
|
175
178
|
TAllParams extends AnyPathParams = AnyPathParams,
|
|
176
|
-
TRouteContext extends
|
|
177
|
-
TAllContext extends
|
|
179
|
+
TRouteContext extends Record<string, any> = AnyContext,
|
|
180
|
+
TAllContext extends Record<string, any> = AnyContext,
|
|
178
181
|
> {
|
|
179
182
|
PendingRouteProps: PendingRouteProps<
|
|
180
183
|
TFullSearchSchema,
|
|
@@ -185,10 +188,10 @@ declare module '@tanstack/router-core' {
|
|
|
185
188
|
}
|
|
186
189
|
|
|
187
190
|
interface RegisterErrorRouteProps<
|
|
188
|
-
TFullSearchSchema extends
|
|
191
|
+
TFullSearchSchema extends Record<string, any> = AnySearchSchema,
|
|
189
192
|
TAllParams extends AnyPathParams = AnyPathParams,
|
|
190
|
-
TRouteContext extends
|
|
191
|
-
TAllContext extends
|
|
193
|
+
TRouteContext extends Record<string, any> = AnyContext,
|
|
194
|
+
TAllContext extends Record<string, any> = AnyContext,
|
|
192
195
|
> {
|
|
193
196
|
ErrorRouteProps: ErrorRouteProps
|
|
194
197
|
}
|
|
@@ -196,10 +199,10 @@ declare module '@tanstack/router-core' {
|
|
|
196
199
|
|
|
197
200
|
export type RouteProps<
|
|
198
201
|
TLoader = unknown,
|
|
199
|
-
TFullSearchSchema extends
|
|
202
|
+
TFullSearchSchema extends Record<string, any> = AnySearchSchema,
|
|
200
203
|
TAllParams extends AnyPathParams = AnyPathParams,
|
|
201
|
-
TRouteContext extends
|
|
202
|
-
TAllContext extends
|
|
204
|
+
TRouteContext extends Record<string, any> = AnyContext,
|
|
205
|
+
TAllContext extends Record<string, any> = AnyContext,
|
|
203
206
|
> = {
|
|
204
207
|
useLoader: <TSelected = TLoader>(opts?: {
|
|
205
208
|
select?: (search: TLoader) => TSelected
|
|
@@ -207,12 +210,9 @@ export type RouteProps<
|
|
|
207
210
|
useMatch: <TSelected = TAllContext>(opts?: {
|
|
208
211
|
select?: (search: TAllContext) => TSelected
|
|
209
212
|
}) => TSelected
|
|
210
|
-
|
|
213
|
+
useRouteContext: <TSelected = TAllContext>(opts?: {
|
|
211
214
|
select?: (search: TAllContext) => TSelected
|
|
212
215
|
}) => TSelected
|
|
213
|
-
useRouteContext: <TSelected = TRouteContext>(opts?: {
|
|
214
|
-
select?: (search: TRouteContext) => TSelected
|
|
215
|
-
}) => TSelected
|
|
216
216
|
useSearch: <TSelected = TFullSearchSchema>(opts?: {
|
|
217
217
|
select?: (search: TFullSearchSchema) => TSelected
|
|
218
218
|
}) => TSelected
|
|
@@ -222,10 +222,10 @@ export type RouteProps<
|
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
export type ErrorRouteProps<
|
|
225
|
-
TFullSearchSchema extends
|
|
225
|
+
TFullSearchSchema extends Record<string, any> = AnySearchSchema,
|
|
226
226
|
TAllParams extends AnyPathParams = AnyPathParams,
|
|
227
|
-
TRouteContext extends
|
|
228
|
-
TAllContext extends
|
|
227
|
+
TRouteContext extends Record<string, any> = AnyContext,
|
|
228
|
+
TAllContext extends Record<string, any> = AnyContext,
|
|
229
229
|
> = {
|
|
230
230
|
error: unknown
|
|
231
231
|
info: { componentStack: string }
|
|
@@ -241,10 +241,10 @@ export type ErrorRouteProps<
|
|
|
241
241
|
>
|
|
242
242
|
|
|
243
243
|
export type PendingRouteProps<
|
|
244
|
-
TFullSearchSchema extends
|
|
244
|
+
TFullSearchSchema extends Record<string, any> = AnySearchSchema,
|
|
245
245
|
TAllParams extends AnyPathParams = AnyPathParams,
|
|
246
|
-
TRouteContext extends
|
|
247
|
-
TAllContext extends
|
|
246
|
+
TRouteContext extends Record<string, any> = AnyContext,
|
|
247
|
+
TAllContext extends Record<string, any> = AnyContext,
|
|
248
248
|
> = Omit<
|
|
249
249
|
RouteProps<
|
|
250
250
|
unknown,
|
|
@@ -264,19 +264,11 @@ Route.__onInit = (route) => {
|
|
|
264
264
|
useLoader: (opts = {}) => {
|
|
265
265
|
return useLoader({ ...opts, from: route.id }) as any
|
|
266
266
|
},
|
|
267
|
-
useContext: (opts: any = {}) => {
|
|
268
|
-
return useMatch({
|
|
269
|
-
...opts,
|
|
270
|
-
from: route.id,
|
|
271
|
-
select: (d: any) => (opts?.select ? opts.select(d.context) : d.context),
|
|
272
|
-
} as any)
|
|
273
|
-
},
|
|
274
267
|
useRouteContext: (opts: any = {}) => {
|
|
275
268
|
return useMatch({
|
|
276
269
|
...opts,
|
|
277
270
|
from: route.id,
|
|
278
|
-
select: (d: any) =>
|
|
279
|
-
opts?.select ? opts.select(d.routeContext) : d.routeContext,
|
|
271
|
+
select: (d: any) => (opts?.select ? opts.select(d.context) : d.context),
|
|
280
272
|
} as any)
|
|
281
273
|
},
|
|
282
274
|
useSearch: (opts = {}) => {
|
|
@@ -349,13 +341,7 @@ export type LinkPropsOptions<
|
|
|
349
341
|
TTo extends string = '',
|
|
350
342
|
TMaskFrom extends RoutePaths<TRouteTree> = '/',
|
|
351
343
|
TMaskTo extends string = '',
|
|
352
|
-
> = LinkOptions<
|
|
353
|
-
RegisteredRouter['routeTree'],
|
|
354
|
-
TFrom,
|
|
355
|
-
TTo,
|
|
356
|
-
TMaskFrom,
|
|
357
|
-
TMaskTo
|
|
358
|
-
> & {
|
|
344
|
+
> = LinkOptions<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> & {
|
|
359
345
|
// A function that returns additional props for the `active` state of this link. These props override other props passed to the link (`style`'s are merged, `className`'s are concatenated)
|
|
360
346
|
activeProps?:
|
|
361
347
|
| React.AnchorHTMLAttributes<HTMLAnchorElement>
|
|
@@ -383,13 +369,13 @@ export type MakeMatchRouteOptions<
|
|
|
383
369
|
TTo extends string = '',
|
|
384
370
|
TMaskFrom extends RoutePaths<TRouteTree> = '/',
|
|
385
371
|
TMaskTo extends string = '',
|
|
386
|
-
> = ToOptions<
|
|
372
|
+
> = ToOptions<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo> &
|
|
387
373
|
MatchRouteOptions & {
|
|
388
374
|
// If a function is passed as a child, it will be given the `isActive` boolean to aid in further styling on the element it returns
|
|
389
375
|
children?:
|
|
390
376
|
| ((
|
|
391
377
|
params?: RouteByPath<
|
|
392
|
-
|
|
378
|
+
TRouteTree,
|
|
393
379
|
ResolveRelativePath<TFrom, NoInfer<TTo>>
|
|
394
380
|
>['types']['allParams'],
|
|
395
381
|
) => ReactNode)
|
|
@@ -589,15 +575,7 @@ export function Navigate<
|
|
|
589
575
|
TTo extends string = '',
|
|
590
576
|
TMaskFrom extends RoutePaths<TRouteTree> = '/',
|
|
591
577
|
TMaskTo extends string = '',
|
|
592
|
-
>(
|
|
593
|
-
props: NavigateOptions<
|
|
594
|
-
RegisteredRouter['routeTree'],
|
|
595
|
-
TFrom,
|
|
596
|
-
TTo,
|
|
597
|
-
TMaskFrom,
|
|
598
|
-
TMaskTo
|
|
599
|
-
>,
|
|
600
|
-
): null {
|
|
578
|
+
>(props: NavigateOptions<TRouteTree, TFrom, TTo, TMaskFrom, TMaskTo>): null {
|
|
601
579
|
const router = useRouter()
|
|
602
580
|
|
|
603
581
|
React.useLayoutEffect(() => {
|
|
@@ -672,7 +650,6 @@ function Matches() {
|
|
|
672
650
|
return React.createElement(ErrorComponent, {
|
|
673
651
|
...props,
|
|
674
652
|
useMatch: route.useMatch,
|
|
675
|
-
useContext: route.useContext,
|
|
676
653
|
useRouteContext: route.useRouteContext,
|
|
677
654
|
useSearch: route.useSearch,
|
|
678
655
|
useParams: route.useParams,
|
|
@@ -731,12 +708,10 @@ type StrictOrFrom<TFrom> =
|
|
|
731
708
|
}
|
|
732
709
|
|
|
733
710
|
export function useMatch<
|
|
734
|
-
|
|
711
|
+
TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
|
|
712
|
+
TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,
|
|
735
713
|
TStrict extends boolean = true,
|
|
736
|
-
TRouteMatchState = RouteMatch<
|
|
737
|
-
RegisteredRouter['routeTree'],
|
|
738
|
-
RouteById<RegisteredRouter['routeTree'], TFrom>
|
|
739
|
-
>,
|
|
714
|
+
TRouteMatchState = RouteMatch<TRouteTree, TFrom>,
|
|
740
715
|
TSelected = TRouteMatchState,
|
|
741
716
|
>(
|
|
742
717
|
opts: StrictOrFrom<TFrom> & {
|
|
@@ -792,20 +767,22 @@ export function useMatch<
|
|
|
792
767
|
return matchSelection as any
|
|
793
768
|
}
|
|
794
769
|
|
|
795
|
-
export type RouteFromIdOrRoute<
|
|
796
|
-
|
|
797
|
-
|
|
770
|
+
export type RouteFromIdOrRoute<
|
|
771
|
+
T,
|
|
772
|
+
TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
|
|
773
|
+
> = T extends ParseRoute<TRouteTree>
|
|
798
774
|
? T
|
|
799
|
-
: T extends RouteIds<
|
|
800
|
-
? RoutesById<
|
|
775
|
+
: T extends RouteIds<TRouteTree>
|
|
776
|
+
? RoutesById<TRouteTree>[T]
|
|
801
777
|
: T extends string
|
|
802
|
-
? RouteIds<
|
|
778
|
+
? RouteIds<TRouteTree>
|
|
803
779
|
: never
|
|
804
780
|
|
|
805
781
|
export function useLoader<
|
|
806
|
-
|
|
782
|
+
TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
|
|
783
|
+
TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,
|
|
807
784
|
TStrict extends boolean = true,
|
|
808
|
-
TLoader = RouteById<
|
|
785
|
+
TLoader = RouteById<TRouteTree, TFrom>['types']['loader'],
|
|
809
786
|
TSelected = TLoader,
|
|
810
787
|
>(
|
|
811
788
|
opts: StrictOrFrom<TFrom> & {
|
|
@@ -822,12 +799,10 @@ export function useLoader<
|
|
|
822
799
|
}
|
|
823
800
|
|
|
824
801
|
export function useRouterContext<
|
|
825
|
-
|
|
802
|
+
TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
|
|
803
|
+
TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,
|
|
826
804
|
TStrict extends boolean = true,
|
|
827
|
-
TContext = RouteById<
|
|
828
|
-
RegisteredRouter['routeTree'],
|
|
829
|
-
TFrom
|
|
830
|
-
>['types']['context'],
|
|
805
|
+
TContext = RouteById<TRouteTree, TFrom>['types']['context'],
|
|
831
806
|
TSelected = TContext,
|
|
832
807
|
>(
|
|
833
808
|
opts: StrictOrFrom<TFrom> & {
|
|
@@ -842,12 +817,10 @@ export function useRouterContext<
|
|
|
842
817
|
}
|
|
843
818
|
|
|
844
819
|
export function useRouteContext<
|
|
845
|
-
|
|
820
|
+
TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
|
|
821
|
+
TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,
|
|
846
822
|
TStrict extends boolean = true,
|
|
847
|
-
TRouteContext = RouteById<
|
|
848
|
-
RegisteredRouter['routeTree'],
|
|
849
|
-
TFrom
|
|
850
|
-
>['types']['routeContext'],
|
|
823
|
+
TRouteContext = RouteById<TRouteTree, TFrom>['types']['context'],
|
|
851
824
|
TSelected = TRouteContext,
|
|
852
825
|
>(
|
|
853
826
|
opts: StrictOrFrom<TFrom> & {
|
|
@@ -858,18 +831,16 @@ export function useRouteContext<
|
|
|
858
831
|
...(opts as any),
|
|
859
832
|
select: (match: RouteMatch) =>
|
|
860
833
|
opts?.select
|
|
861
|
-
? opts.select(match.
|
|
862
|
-
: match.
|
|
834
|
+
? opts.select(match.context as TRouteContext)
|
|
835
|
+
: match.context,
|
|
863
836
|
})
|
|
864
837
|
}
|
|
865
838
|
|
|
866
839
|
export function useSearch<
|
|
867
|
-
|
|
840
|
+
TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
|
|
841
|
+
TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,
|
|
868
842
|
TStrict extends boolean = true,
|
|
869
|
-
TSearch = RouteById<
|
|
870
|
-
RegisteredRouter['routeTree'],
|
|
871
|
-
TFrom
|
|
872
|
-
>['types']['fullSearchSchema'],
|
|
843
|
+
TSearch = RouteById<TRouteTree, TFrom>['types']['fullSearchSchema'],
|
|
873
844
|
TSelected = TSearch,
|
|
874
845
|
>(
|
|
875
846
|
opts: StrictOrFrom<TFrom> & {
|
|
@@ -885,9 +856,10 @@ export function useSearch<
|
|
|
885
856
|
}
|
|
886
857
|
|
|
887
858
|
export function useParams<
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
859
|
+
TRouteTree extends AnyRoute = RegisteredRouter['routeTree'],
|
|
860
|
+
TFrom extends RouteIds<TRouteTree> = RouteIds<TRouteTree>,
|
|
861
|
+
TDefaultSelected = AllParams<TRouteTree> &
|
|
862
|
+
RouteById<TRouteTree, TFrom>['types']['allParams'],
|
|
891
863
|
TSelected = TDefaultSelected,
|
|
892
864
|
>(
|
|
893
865
|
opts: StrictOrFrom<TFrom> & {
|
|
@@ -1017,7 +989,6 @@ function Match({ matchIds }: { matchIds: string[] }) {
|
|
|
1017
989
|
return React.createElement(routeErrorComponent, {
|
|
1018
990
|
...props,
|
|
1019
991
|
useMatch: route.useMatch,
|
|
1020
|
-
useContext: route.useContext,
|
|
1021
992
|
useRouteContext: route.useRouteContext,
|
|
1022
993
|
useSearch: route.useSearch,
|
|
1023
994
|
useParams: route.useParams,
|
|
@@ -1031,7 +1002,6 @@ function Match({ matchIds }: { matchIds: string[] }) {
|
|
|
1031
1002
|
<ResolvedSuspenseBoundary
|
|
1032
1003
|
fallback={React.createElement(PendingComponent, {
|
|
1033
1004
|
useMatch: route.useMatch,
|
|
1034
|
-
useContext: route.useContext,
|
|
1035
1005
|
useRouteContext: route.useRouteContext,
|
|
1036
1006
|
useSearch: route.useSearch,
|
|
1037
1007
|
useParams: route.useParams,
|
|
@@ -1077,7 +1047,6 @@ function MatchInner({
|
|
|
1077
1047
|
return React.createElement(PendingComponent, {
|
|
1078
1048
|
useLoader: route.useLoader,
|
|
1079
1049
|
useMatch: route.useMatch,
|
|
1080
|
-
useContext: route.useContext,
|
|
1081
1050
|
useRouteContext: route.useRouteContext,
|
|
1082
1051
|
useSearch: route.useSearch,
|
|
1083
1052
|
useParams: route.useParams,
|
|
@@ -1091,7 +1060,6 @@ function MatchInner({
|
|
|
1091
1060
|
return React.createElement(comp, {
|
|
1092
1061
|
useLoader: route.useLoader,
|
|
1093
1062
|
useMatch: route.useMatch,
|
|
1094
|
-
useContext: route.useContext as any,
|
|
1095
1063
|
useRouteContext: route.useRouteContext as any,
|
|
1096
1064
|
useSearch: route.useSearch,
|
|
1097
1065
|
useParams: route.useParams as any,
|