File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @remix-run/router " : minor
3
+ " react-router " : minor
4
+ " react-router-dom " : minor
5
+ ---
6
+
7
+ Add ` fetcherKey ` as a parameter to ` patchRoutesOnNavigation `
Original file line number Diff line number Diff line change @@ -2266,7 +2266,8 @@ export function createRouter(init: RouterInit): Router {
2266
2266
let discoverResult = await discoverRoutes (
2267
2267
requestMatches ,
2268
2268
new URL ( fetchRequest . url ) . pathname ,
2269
- fetchRequest . signal
2269
+ fetchRequest . signal ,
2270
+ key
2270
2271
) ;
2271
2272
2272
2273
if ( discoverResult . type === "aborted" ) {
@@ -2558,7 +2559,8 @@ export function createRouter(init: RouterInit): Router {
2558
2559
let discoverResult = await discoverRoutes (
2559
2560
matches ,
2560
2561
new URL ( fetchRequest . url ) . pathname ,
2561
- fetchRequest . signal
2562
+ fetchRequest . signal ,
2563
+ key
2562
2564
) ;
2563
2565
2564
2566
if ( discoverResult . type === "aborted" ) {
@@ -3281,7 +3283,8 @@ export function createRouter(init: RouterInit): Router {
3281
3283
async function discoverRoutes (
3282
3284
matches : AgnosticDataRouteMatch [ ] ,
3283
3285
pathname : string ,
3284
- signal : AbortSignal
3286
+ signal : AbortSignal ,
3287
+ fetcherKey ?: string
3285
3288
) : Promise < DiscoverRoutesResult > {
3286
3289
if ( ! patchRoutesOnNavigationImpl ) {
3287
3290
return { type : "success" , matches } ;
@@ -3297,6 +3300,7 @@ export function createRouter(init: RouterInit): Router {
3297
3300
signal,
3298
3301
path : pathname ,
3299
3302
matches : partialMatches ,
3303
+ fetcherKey,
3300
3304
patch : ( routeId , children ) => {
3301
3305
if ( signal . aborted ) return ;
3302
3306
patchRoutesImpl (
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ export type AgnosticPatchRoutesOnNavigationFunctionArgs<
262
262
signal : AbortSignal ;
263
263
path : string ;
264
264
matches : M [ ] ;
265
+ fetcherKey : string | undefined ;
265
266
patch : ( routeId : string | null , children : O [ ] ) => void ;
266
267
} ;
267
268
You can’t perform that action at this time.
0 commit comments