@preact/signals-react
3.12.0 · 4 Aug 2026MIT732k / weekRepositoryHomepagenpmAtom feed
48 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 3.x · latest line
3.12.0
4 Aug 2026Add 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.11.1
31 Jul 2026Export the
ModelFactorytype from the Preact and React adapters.
3.11.0
23 Jul 2026Add 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.
3.10.3
7 Jul 2026Allow
<For>to accept readonly arrays and signals containing readonly arrays.
Patch Changes
Allow
<For>to accept readonly arrays and signals containing readonly arrays.
3.10.2
16 Jun 2026Fix 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.
Patch Changes
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.
3.10.1
11 May 2026Update
live-signalwithin an effect to avoid thecannot update component while rendering other componenterror in react.
Patch Changes
Update
live-signalwithin an effect to avoid thecannot update component while rendering other componenterror in react.
3.10.0
27 Mar 2026Add optional
getKeyprop to<For>component for stable list reconciliation. When provided,getKeygenerates stable keys for the internal<Item>wrapper, fixing incorrect DOM reuse when items are removed or reordered.
3.9.1
8 Mar 2026Fix infinite recursion when tools like Storybook traverse Signal props
Patch Changes
Fix infinite recursion when tools like Storybook traverse Signal props
3.9.0
13 Feb 2026Support returning a plain array in the
whenof aForcomponent
3.8.0
4 Feb 2026Add
useModelhook for using Models in componentsThe new
useModelhook provides a convenient way to use Models (created withcreateModel) 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>; }
Minor Changes
Add
useModelhook for using Models in componentsThe new
useModelhook provides a convenient way to use Models (created withcreateModel) within React and Preact components. It handles:Creating the model instance lazily on first render
Maintaining the same instance across re-renders
Automatically disposing the model when the component unmounts
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>; }
3.7.0
21 Jan 2026Add
componentNametouseSignalsfor debuggingEnsure that the
ForandShowcomponent have display-names
3.6.2
20 Jan 2026Add mangle entry for _debugCallback
Patch Changes
Add mangle entry for _debugCallback
3.6.1
19 Nov 2025Widen utility component types to accept ComponentChildren/ReactNodes as children and fallbacks
Allow useLiveSignal to accept plain values
3.6.0
14 Nov 2025Revert the changes to
useComputed, sincere apologies for the inconvenience we've discussed this at length and are going to side on the perf side.
3.5.0
12 Nov 2025Allow the
whenproperty ofShowto be a function so not everything has to be transformed into a boolean computedEnsure the cached and non-cached shape is the same
Prevent
Forcache from expanding infinitely
3.4.0
6 Nov 2025Revert 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
ForandShowaccount for nested reactivity
3.3.0
19 Aug 2025Allow for naming your singals/computeds/effects
Minor Changes
Allow for naming your singals/computeds/effects
3.2.1
29 Jun 2025Reading the note…
3.2.0
29 May 2025Add an option to specify a watched/unwatched callback to a signal
Minor Changes
Add an option to specify a watched/unwatched callback to a signal
3.1.1
27 May 2025Reading the note…
3.1.0
27 May 2025Add a
@preact/signals-react/utilsentrypoint containing common Signal utilities
3.0.1
13 Jan 2025Reading the note…
3.0.0
2 Jan 2025- Breaking
Remove
/autoand automatic tracking as it is incompatible with React 19
- 2.x
2.3.0
17 Dec 2024Reading the note…
2.2.0
8 Aug 2024Reading the note…
2.1.0
6 Jul 2024Reading the note…
2.0.2
12 Jun 2024Reading the note…
2.0.1
19 Mar 2024Reading the note…
2.0.0
18 Dec 2023Reading the note…
- 1.x
1.3.8
7 Dec 2023Reading the note…
1.3.7
22 Nov 2023Reading the note…
1.3.6
11 Aug 2023Reading the note…
1.3.5
2 Aug 2023Reading the note…
1.3.4
7 Jul 2023Reading the note…
1.3.3
29 Jun 2023Reading the note…
1.3.2
1 May 2023Reading the note…
1.3.1
13 Apr 2023Reading the note…
1.3.0
11 Apr 2023Reading the note…
1.2.2
29 Dec 2022Reading the note…
1.2.1
15 Oct 2022Reading the note…
1.2.0
13 Oct 2022Reading the note…
1.1.1
1 Oct 2022Reading the note…
1.1.0
21 Sep 2022Reading the note…
1.0.2
15 Sep 2022Reading the note…
1.0.1
13 Sep 2022Reading the note…
1.0.0
5 Sep 2022Reading the note…
- 0.0.x
0.0.2
2 Sep 2022Reading 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.