@remix-run/router 0.0.0-experimental-3ce8d73c7 → 0.0.0-experimental-078ef8de9
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/dist/router.cjs.js +3 -17
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.d.ts +0 -1
- package/dist/router.js +3 -16
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +3 -17
- package/dist/router.umd.js.map +1 -1
- package/dist/router.umd.min.js +2 -2
- package/dist/router.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/router.ts +9 -34
package/dist/router.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v0.0.0-experimental-
|
|
2
|
+
* @remix-run/router v0.0.0-experimental-078ef8de9
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -3604,24 +3604,10 @@ function createRouter(init) {
|
|
|
3604
3604
|
manifest = {};
|
|
3605
3605
|
inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);
|
|
3606
3606
|
}
|
|
3607
|
-
|
|
3608
|
-
// single-patch implementation:
|
|
3609
|
-
// router.patchRoutes(parentId, children);
|
|
3610
|
-
//
|
|
3611
|
-
// batch-patch implementation:
|
|
3612
|
-
// router.patchRoutes((patch) => {
|
|
3613
|
-
// patch(parentId1, children1);
|
|
3614
|
-
// patch(parentId2, children2);
|
|
3615
|
-
// patch(parentId3, children3);
|
|
3616
|
-
// });
|
|
3617
|
-
function patchRoutes(routeIdOrCb, children) {
|
|
3607
|
+
function patchRoutes(routeId, children) {
|
|
3618
3608
|
let isNonHMR = inFlightDataRoutes == null;
|
|
3619
3609
|
let routesToUse = inFlightDataRoutes || dataRoutes;
|
|
3620
|
-
|
|
3621
|
-
routeIdOrCb((r, c) => patchRoutesImpl(r, c, routesToUse, manifest, mapRouteProperties));
|
|
3622
|
-
} else if (typeof routeIdOrCb === "string" && children != null) {
|
|
3623
|
-
patchRoutesImpl(routeIdOrCb, children, routesToUse, manifest, mapRouteProperties);
|
|
3624
|
-
}
|
|
3610
|
+
patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties);
|
|
3625
3611
|
|
|
3626
3612
|
// If we are not in the middle of an HMR revalidation and we changed the
|
|
3627
3613
|
// routes, provide a new identity and trigger a reflow via `updateState`
|