@solidjs/router 1.0.0-next.7 → 1.0.0-next.8
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/claims.js +8 -1
- package/dist/index.js +10 -1
- package/package.json +1 -1
package/dist/claims.js
CHANGED
|
@@ -84,7 +84,14 @@ export function setupLinkClaims(router, explicitLinks) {
|
|
|
84
84
|
// linkState derives from (the in-flight pendingTarget is readable in the
|
|
85
85
|
// effect phase because the isRouting write flushes after the target is
|
|
86
86
|
// assigned), the effect phase sweeps the registry untracked.
|
|
87
|
-
|
|
87
|
+
//
|
|
88
|
+
// `transparent` keeps the effect invisible to the hydration id scheme.
|
|
89
|
+
// This setup is client-only, so an id-consuming node here has no server
|
|
90
|
+
// counterpart and every subsequent hydration id would shift by one child
|
|
91
|
+
// slot — lazy-route lookups miss and hydration leaves server nodes
|
|
92
|
+
// unclaimed. (The option is honored by the runtime but missing from the
|
|
93
|
+
// published EffectOptions type, hence the cast.)
|
|
94
|
+
createRenderEffect(() => (router.location.pathname, router.isRouting()), () => registry.forEach(a => refresh(a, claimed.get(a))), { transparent: true });
|
|
88
95
|
onCleanup(registerElementClaim(node => {
|
|
89
96
|
if (node.nodeName.toUpperCase() !== "A")
|
|
90
97
|
return;
|
package/dist/index.js
CHANGED
|
@@ -267,7 +267,16 @@ function setupLinkClaims(router, explicitLinks) {
|
|
|
267
267
|
// linkState derives from (the in-flight pendingTarget is readable in the
|
|
268
268
|
// effect phase because the isRouting write flushes after the target is
|
|
269
269
|
// assigned), the effect phase sweeps the registry untracked.
|
|
270
|
-
|
|
270
|
+
//
|
|
271
|
+
// `transparent` keeps the effect invisible to the hydration id scheme.
|
|
272
|
+
// This setup is client-only, so an id-consuming node here has no server
|
|
273
|
+
// counterpart and every subsequent hydration id would shift by one child
|
|
274
|
+
// slot — lazy-route lookups miss and hydration leaves server nodes
|
|
275
|
+
// unclaimed. (The option is honored by the runtime but missing from the
|
|
276
|
+
// published EffectOptions type, hence the cast.)
|
|
277
|
+
createRenderEffect(() => (router.location.pathname, router.isRouting()), () => registry.forEach(a => refresh(a, claimed.get(a))), {
|
|
278
|
+
transparent: true
|
|
279
|
+
});
|
|
271
280
|
onCleanup(registerElementClaim(node => {
|
|
272
281
|
if (node.nodeName.toUpperCase() !== "A") return;
|
|
273
282
|
const a = node;
|