Skip to content

Releases: preactjs/signals

@preact/signals@2.9.3

Choose a tag to compare

@github-actions github-actions released this 07 Jul 05:57
f6437f7

Patch Changes

  • #950 76f9155 Thanks @joeyTedeschi! - Allow <For> to accept readonly arrays and signals containing readonly arrays.

  • #948 6b0a76c Thanks @JoviDeCroock! - Dispose signal prop updaters when an element re-renders without any signal props.

    The disposal pass only ran when the new render still carried at least one signal-bound prop. When every signal prop was replaced by plain values, the old updater effect stayed subscribed and kept writing the previous signal's values straight into the DOM, overriding whatever Preact rendered.

  • Updated dependencies [2910fbf, d40746b]:

    • @preact/signals-core@1.14.4

@preact/signals-react@3.10.3

Choose a tag to compare

@github-actions github-actions released this 07 Jul 05:57
f6437f7

Patch Changes

@preact/signals-core@1.14.4

Choose a tag to compare

@github-actions github-actions released this 07 Jul 05:57
f6437f7

Patch Changes

  • #947 2910fbf Thanks @JoviDeCroock! - Fix computeds returning stale values after a batch reverts a signal to its original value.

    Reconciling a reverted batch write used to roll the signal's version number back, breaking version monotonicity. A lazy computed that read the signal during the batch had already observed the intermediate version, so a later write could re-mint that same version number for a different value and the computed would treat it as unchanged forever. Subscriber nodes that saw the pre-batch version are now fast-forwarded instead, keeping the no-op skip optimization without ever reusing version numbers.

  • #945 d40746b Thanks @andrewiggins! - Prevent model effect capture while creating effects inside untracked() and action() callbacks.

    If you create an effect() inside an untracked() callback within a createModel() factory, that effect is no longer disposed when the model is disposed. Use the disposer returned by effect() to clean it up manually.

@preact/signals@2.9.2

Choose a tag to compare

@github-actions github-actions released this 16 Jun 17:03
913110a

Patch Changes

  • #942 e76780c Thanks @JoviDeCroock! - Fix stale <For> render-prop indexes after removals/reorders by making each cached item's index reactive (a per-item signal) instead of a frozen prop. Cached children are reused and re-render with the new index rather than being recreated, so DOM/component identity is preserved.

  • #938 e0ce9fd Thanks @JoviDeCroock! - Fix Signal-bound DOM props getting stranded at a stale value when Preact reuses a DOM node. The prop-binding effect now writes the applied value back into the rendered props, keeping Preact's diff baseline in sync with the DOM instead of assuming Preact applied every update.

  • Updated dependencies [beb84c1]:

    • @preact/signals-core@1.14.3

@preact/signals-react@3.10.2

Choose a tag to compare

@github-actions github-actions released this 16 Jun 17:03
913110a

Patch Changes

  • #942 e76780c Thanks @JoviDeCroock! - Fix stale <For> render-prop indexes after removals/reorders by making each cached item's index reactive (a per-item signal) instead of a frozen prop. Cached children are reused and re-render with the new index rather than being recreated, so DOM/component identity is preserved.

  • Updated dependencies [beb84c1]:

    • @preact/signals-core@1.14.3

@preact/signals-core@1.14.3

Choose a tag to compare

@github-actions github-actions released this 16 Jun 17:03
913110a

Patch Changes

@preact/eslint-plugin-signals@0.3.0

Choose a tag to compare

@github-actions github-actions released this 16 Jun 17:03
913110a

Minor Changes

  • #940 70c7b9f Thanks @JoviDeCroock! - Add no-useless-computed rule that flags computed()/useComputed() callbacks which only return a single signal's .value without transformation

@preact/signals-react@3.10.1

Choose a tag to compare

@github-actions github-actions released this 11 May 07:25
3952962

Patch Changes

  • #918 8732619 Thanks @JoviDeCroock! - Update live-signal within an effect to avoid the cannot update component while rendering other component error in react.

  • Updated dependencies [054afc1]:

    • @preact/signals-core@1.14.2

@preact/signals-core@1.14.2

Choose a tag to compare

@github-actions github-actions released this 11 May 07:25
3952962

Patch Changes

@preact/signals-core@1.14.1

Choose a tag to compare

@github-actions github-actions released this 31 Mar 15:45
c33d375

Patch Changes

  • #906 0c65390 Thanks @JoviDeCroock! - Wrap nested object methods returned from createModel so composed models keep action batching semantics without manual action wrappers.

  • #911 6c17923 Thanks @JoviDeCroock! - Avoid hard-requiring ESNext.Disposable in consumer tsconfigs for Model and effect() types.