@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.
@@ -9102,11 +9102,7 @@ const route = (pattern, options = {}) => {
9102
9102
  );
9103
9103
  }
9104
9104
  // eslint-disable-next-line no-loop-func
9105
- const cleanupSignalUrlEffect = effect(() => {
9106
- const value = paramSignal.value;
9107
- // Use peek() to avoid subscribing to URL-derived signals.
9108
- // This effect should only re-run when the param signal changes,
9109
- // not when the URL changes (which would create a cycle: signal→URL→signal).
9105
+ const writeValueInUrl = (value) => {
9110
9106
  const rawParams = route.rawParamsSignal.peek();
9111
9107
  const urlParamValue = rawParams[paramName];
9112
9108
  const matching = route.matchingSignal.peek();
@@ -9181,6 +9177,14 @@ const route = (pattern, options = {}) => {
9181
9177
  debounceUrl,
9182
9178
  },
9183
9179
  );
9180
+ };
9181
+ const cleanupSignalUrlEffect = effect(() => {
9182
+ const value = paramSignal.value;
9183
+ // Only the param signal re-runs this effect. Writing the url reads
9184
+ // more (the route's other params, to build it): subscribed to those,
9185
+ // the write is made again whenever one of them changes — a second
9186
+ // entry when the write pushes.
9187
+ untracked(() => writeValueInUrl(value));
9184
9188
  });
9185
9189
  cleanupSignalUrlEffectSet.add(cleanupSignalUrlEffect);
9186
9190
  }