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 {
22662266 let discoverResult = await discoverRoutes (
22672267 requestMatches ,
22682268 new URL ( fetchRequest . url ) . pathname ,
2269- fetchRequest . signal
2269+ fetchRequest . signal ,
2270+ key
22702271 ) ;
22712272
22722273 if ( discoverResult . type === "aborted" ) {
@@ -2558,7 +2559,8 @@ export function createRouter(init: RouterInit): Router {
25582559 let discoverResult = await discoverRoutes (
25592560 matches ,
25602561 new URL ( fetchRequest . url ) . pathname ,
2561- fetchRequest . signal
2562+ fetchRequest . signal ,
2563+ key
25622564 ) ;
25632565
25642566 if ( discoverResult . type === "aborted" ) {
@@ -3281,7 +3283,8 @@ export function createRouter(init: RouterInit): Router {
32813283 async function discoverRoutes (
32823284 matches : AgnosticDataRouteMatch [ ] ,
32833285 pathname : string ,
3284- signal : AbortSignal
3286+ signal : AbortSignal ,
3287+ fetcherKey ?: string
32853288 ) : Promise < DiscoverRoutesResult > {
32863289 if ( ! patchRoutesOnNavigationImpl ) {
32873290 return { type : "success" , matches } ;
@@ -3297,6 +3300,7 @@ export function createRouter(init: RouterInit): Router {
32973300 signal,
32983301 path : pathname ,
32993302 matches : partialMatches ,
3303+ fetcherKey,
33003304 patch : ( routeId , children ) => {
33013305 if ( signal . aborted ) return ;
33023306 patchRoutesImpl (
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ export type AgnosticPatchRoutesOnNavigationFunctionArgs<
262262 signal : AbortSignal ;
263263 path : string ;
264264 matches : M [ ] ;
265+ fetcherKey : string | undefined ;
265266 patch : ( routeId : string | null , children : O [ ] ) => void ;
266267} ;
267268
You can’t perform that action at this time.
0 commit comments