Packages

@preact/signals-react

3.12.0 · 4 Aug 2026MIT732k / weekRepositoryHomepagenpmAtom feed

Your version

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

  1. 3.x · latest line
  2. 3.12.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.

  3. 3.11.1

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

  4. 3.11.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.

  5. 3.10.3

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

  6. 3.10.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.

  7. 3.10.1

    11 May 2026
    • Update live-signal within an effect to avoid the cannot update component while rendering other component error in react.

  8. 3.10.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.

  9. 3.9.1

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

  10. 3.9.0

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

  11. 3.8.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>;
      }
  12. 3.7.0

    21 Jan 2026
    • Add componentName to useSignals for debugging

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

  13. 3.6.2

    20 Jan 2026
    • Add mangle entry for _debugCallback

  14. 3.6.1

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

    • Allow useLiveSignal to accept plain values

  15. 3.6.0

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

  16. 3.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

  17. 3.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 For and Show account for nested reactivity

  18. 3.3.1

    4 Oct 2025
    • Reflect logic from #754 in react

  19. 3.3.0

    19 Aug 2025
    • Allow for naming your singals/computeds/effects

  20. 3.2.1

    29 Jun 2025

    Reading the note…

  21. 3.2.0

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

  22. 3.1.1

    27 May 2025

    Reading the note…

  23. 3.1.0

    27 May 2025
    • Add a @preact/signals-react/utils entrypoint containing common Signal utilities

  24. 3.0.1

    13 Jan 2025

    Reading the note…

  25. 3.0.0

    2 Jan 2025
    • Breaking

      Remove /auto and automatic tracking as it is incompatible with React 19

  26. 2.x
  27. 2.3.0

    17 Dec 2024

    Reading the note…

  28. 2.2.0

    8 Aug 2024

    Reading the note…

  29. 2.1.0

    6 Jul 2024

    Reading the note…

  30. 2.0.2

    12 Jun 2024

    Reading the note…

  31. 2.0.1

    19 Mar 2024

    Reading the note…

  32. 2.0.0

    18 Dec 2023

    Reading the note…

  33. 1.x
  34. 1.3.8

    7 Dec 2023

    Reading the note…

  35. 1.3.7

    22 Nov 2023

    Reading the note…

  36. 1.3.6

    11 Aug 2023

    Reading the note…

  37. 1.3.5

    2 Aug 2023

    Reading the note…

  38. 1.3.4

    7 Jul 2023

    Reading the note…

  39. 1.3.3

    29 Jun 2023

    Reading the note…

  40. 1.3.2

    1 May 2023

    Reading the note…

  41. 1.3.1

    13 Apr 2023

    Reading the note…

  42. 1.3.0

    11 Apr 2023

    Reading the note…

  43. 1.2.2

    29 Dec 2022

    Reading the note…

  44. 1.2.1

    15 Oct 2022

    Reading the note…

  45. 1.2.0

    13 Oct 2022

    Reading the note…

  46. 1.1.1

    1 Oct 2022

    Reading the note…

  47. 1.1.0

    21 Sep 2022

    Reading the note…

  48. 1.0.2

    15 Sep 2022

    Reading the note…

  49. 1.0.1

    13 Sep 2022

    Reading the note…

  50. 1.0.0

    5 Sep 2022

    Reading the note…

  51. 0.0.x
  52. 0.0.2

    2 Sep 2022

    Reading the note…

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.