@jsenv/navi 0.29.500 → 0.29.501

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.
@@ -8727,11 +8727,7 @@ const route = (pattern, options = {}) => {
8727
8727
  );
8728
8728
  }
8729
8729
  // eslint-disable-next-line no-loop-func
8730
- const cleanupSignalUrlEffect = effect(() => {
8731
- const value = paramSignal.value;
8732
- // Use peek() to avoid subscribing to URL-derived signals.
8733
- // This effect should only re-run when the param signal changes,
8734
- // not when the URL changes (which would create a cycle: signal→URL→signal).
8730
+ const writeValueInUrl = (value) => {
8735
8731
  const rawParams = route.rawParamsSignal.peek();
8736
8732
  const urlParamValue = rawParams[paramName];
8737
8733
  const matching = route.matchingSignal.peek();
@@ -8806,6 +8802,14 @@ const route = (pattern, options = {}) => {
8806
8802
  debounceUrl,
8807
8803
  },
8808
8804
  );
8805
+ };
8806
+ const cleanupSignalUrlEffect = effect(() => {
8807
+ const value = paramSignal.value;
8808
+ // Only the param signal re-runs this effect. Writing the url reads
8809
+ // more (the route's other params, to build it): subscribed to those,
8810
+ // the write is made again whenever one of them changes — a second
8811
+ // entry when the write pushes.
8812
+ untracked(() => writeValueInUrl(value));
8809
8813
  });
8810
8814
  cleanupSignalUrlEffectSet.add(cleanupSignalUrlEffect);
8811
8815
  }