Packages

@preact/signals

2.11.4 · 27 Oct 2026MIT4.7M / weekRepositoryHomepagenpmAtom feed

Your version

60 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 2.x · latest line
  2. 2.11.4

    27 Oct 2026
    • Use the active Preact VNode marker.

  3. 2.11.3

    30 Sep 2026
    • Don't re-run a useSignalEffect for a component that was unmounted by the same update. Preact 11 disposes it after paint, so the effect could otherwise run once more against an unmounted component.

  4. 2.11.2

    4 Sep 2026
    • Stop component tracking before Preact reconciles the returned VNode so Signals read by DOM property getters do not subscribe the parent component.

  5. 2.11.1

    14 Aug 2026
    • Avoid closing over VNodes in component updater callbacks.

  6. 2.11.0

    4 Aug 2026
    • Add support for passing functions as fallback to <For> for lazy instantiation.

      <For each={list} fallback={() => <p>No items</p>}>
        {item => <p>{item}</p>}
      </For>

      This avoids eager evaluation of the fallback when the collection has items, which matters when you're dealing with signals.

  7. 2.10.1

    31 Jul 2026
    • Export the ModelFactory type from the Preact and React adapters.

  8. 2.10.0

    23 Jul 2026
    • Add support for passing functions as fallback to <Show> for lazy instantiation.

      <Show when={toggle} fallback={() => <p>I'm lazy</p>}>
        <p>foo</p>
      </Show>

      This avoids eager evaluation of whatever is passed to fallback which matters when you're dealing with signals.

    • Name signals created internally by the Preact adapter and useLiveSignal so debugging tools can identify them.

  9. 2.9.4

    15 Jul 2026
    • Stop treating useContext as hook state in the auto-memoization heuristic. Context updates force-update their subscribers in Preact, bypassing shouldComponentUpdate entirely, so context consumers can safely keep the props-based render skipping.

  10. 2.9.3

    7 Jul 2026
    • Allow <For> to accept readonly arrays and signals containing readonly arrays.

    • 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.

  11. 2.9.2

    16 Jun 2026
    • 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.

    • 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.

  12. 2.9.1

    25 May 2026
    • Fix redundant DOM attribute writes when a parent rerenders with unchanged signal props. The DIFFED hook no longer writes Signal references back into vnode.props, which was causing Preact's prop diff to see a mismatch (old: Signal, new: peeked value) and re-apply every signal-bound attribute on every parent rerender.

  13. 2.9.0

    27 Mar 2026
    • Add optional getKey prop to <For> component for stable list reconciliation. When provided, getKey generates stable keys for the internal <Item> wrapper, fixing incorrect DOM reuse when items are removed or reordered.

  14. 2.8.2

    8 Mar 2026
    • Fix infinite recursion when tools like Storybook traverse Signal props

  15. 2.8.1

    16 Feb 2026
    • Ensure that re-mounting components preserve the DOM updaters correctly

  16. 2.8.0

    13 Feb 2026
    • Support returning a plain array in the when of a For component

  17. 2.7.1

    9 Feb 2026
    • Prevent scheduled effects from highjacking the execution-context

  18. 2.7.0

    4 Feb 2026
    • Add useModel hook for using Models in components

      The new useModel hook provides a convenient way to use Models (created with createModel) within React and Preact components. It handles:

      import { createModel, signal } from "@preact/signals-core";
      import { useModel } from "@preact/signals-react"; // or "@preact/signals"
      
      const CountModel = createModel(() => ({
          count: signal(0),
          increment() {
              this.count.value++;
          },
      }));
      
      function Counter() {
          const model = useModel(CountModel);
          return <button onClick={() => model.increment()}>{model.count}</button>;
      }

      For models that require constructor arguments, wrap in a factory function:

      const CountModel = createModel((initialCount: number) => ({
        count: signal(initialCount),
      }));
      
      function Counter() {
        const model = useModel(() => new CountModel(5));
        return <div>{model.count}</div>;
      }
    • Revert #728 - this might entail work in prefresh but currently the presence of uesState makes every sCU bail

  19. 2.6.2

    30 Jan 2026
    • Fix issue where unmounted vnodes could update with signals

  20. 2.6.1

    21 Jan 2026
    • Ensure that the For and Show component have display-names

  21. 2.6.0

    20 Jan 2026
    • Removed

      Remove the need for enter/exit component and track the effects normally

    • Add mangle entry for _debugCallback

  22. 2.5.1

    19 Nov 2025
    • Widen utility component types to accept ComponentChildren/ReactNodes as children and fallbacks

    • Fix performance regression by checking if the @preact/signals-debug package is enabled only once.

    • Allow useLiveSignal to accept plain values

  23. 2.5.0

    12 Nov 2025
    • Allow the when property of Show to be a function so not everything has to be transformed into a boolean computed

    • Ensure the cached and non-cached shape is the same

    • Prevent For cache from expanding infinitely

  24. 2.4.0

    6 Nov 2025
    • Revert the changes to useComputed, sincere apologies for the inconvenience we've discussed this at length and are going to side on the perf side.

    • Ensure aria/data attributes stick around when going back to an empty string

    • Ensure For and Show account for nested reactivity

  25. 2.3.2

    4 Oct 2025
    • Update useComputed compute function on rerender

  26. 2.3.1

    20 Aug 2025
    • Correct semver range to support beta releases of Preact v11

  27. 2.3.0

    19 Aug 2025
    • Call into component tracking of the chrome extension

    • Allow for naming your singals/computeds/effects

    • Fix prefresh HMR not working with useSignal.

  28. 2.2.1

    29 Jun 2025
    • Narrow types for Show utility, the callback is truthy by design

  29. 2.2.0

    29 May 2025
    • Add an option to specify a watched/unwatched callback to a signal

  30. 2.1.1

    27 May 2025
    • Ensure we build the thing

  31. 2.1.0

    27 May 2025
    • Provide @preact/signals/utils package with some helpers to make working with signals easier in Preact

  32. 2.0.5

    24 May 2025
    • We reduce the raf timeout to be just above a timeout that is associated with a 30hz refresh rate. This ensures that for hidden frames the timeout drift can't be too large, the drift being too high could lead to unexpected situations.

    • Fix accessing signals from Preact Class Component constructor.

  33. 2.0.4

    20 Apr 2025
    • Correctly set peerDep of signals

  34. 2.0.3

    4 Apr 2025
    • Fix array signals when used as jsx

  35. 2.0.2

    26 Mar 2025
    • Avoid usage of .base and check the _dom on the vnode instead

    • Bail out of the animation frame with a setTimeout in case the origin page is hidden

  36. 2.0.1

    13 Jan 2025
    • Ensure that text effects get disposed

    • Change the way we deal with state settling hooks, when we know we are dealing with hooks that can settle their A -> B -> A state (and wind up at the same value). We should not verbatim rerender in our custom shouldComponentUpdate. Instead we should trust that hooks have handled their own state settling.

  37. 2.0.0

    17 Dec 2024
    • Breaking

      Defer all DOM updates by an animation frame, this should make it so
      that any previously synchronous DOM update will be instead delayed by an
      animation frame. This allows Preact to first perform its own render
      cycle and then our direct DOM updates to occur. These will now
      be performed in a batched way which is more performant as the browser
      is prepared to handle these during the animation frame.

      This does impact how Preact based signals are tested, when
      you perform a signal update, you'll need to wrap it in act. In a way
      this was always the case, as a signal update that resulted in
      a Preact state update would require it to be wrapped in act, but
      now this is the norm.

    • Align signal effects with animation-frames for better performance

    • Change timing to a double microtask so we are behind the Preact render queue but can't delay as much as a user-input coming in.

  38. 1.x
  39. 1.3.4

    7 Feb 2026
    • Prevent scheduled effects from highjacking the execution-context

  40. 1.3.3

    29 Jan 2026
    • Fix issue where unmounted vnodes could update with signals

  41. 1.3.2

    13 Jan 2025
    • Change the way we deal with state settling hooks, when we know we are dealing with hooks that can settle their A -> B -> A state (and wind up at the same value). We should not verbatim rerender in our custom shouldComponentUpdate. Instead we should trust that hooks have handled their own state settling.

  42. 1.3.1

    27 Nov 2024
    • Simplify text update patch to avoid using new internals

    • Ensure that the Effects versions are updated when using it as a JSX Signal

  43. 1.3.0

    6 Jul 2024
    • Allow for passing no argument to the signal and the type to be automatically inferred as T | undefined

  44. 1.2.3

    19 Mar 2024
    • Publish packages with provenance statements

  45. 1.2.2

    22 Nov 2023
  46. 1.2.1

    11 Aug 2023
  47. 1.2.0

    2 Aug 2023
    • Removed

      Removed difference in behaviour between adapters, signals that use a JSX value will correctly re-render the whole component rather than attempting the JSX-Text optimization.

  48. 1.1.5

    7 Jul 2023
    • Allow for context to propagate to components using context

  49. 1.1.4

    29 Jun 2023
    • Removed

      Removes package.json#exports.umd, which had invalid paths if they were ever to be consumed

  50. 1.1.3

    29 Dec 2022
    • Fix rendering of Signals as text in preact-render-to-string

    • cafbdaa Thanks @developit! - Fix a bug that caused cleanup functions returned from a useSignalEffect() callback not to be called.

  51. 1.1.2

    13 Oct 2022
    • Fix hook names being mangled

  52. 1.1.1

    22 Sep 2022
    • Fix server-sider-render error when unmounting a signal passed as text into JSX.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.