PackageTrack

npm · #4327

@preact/signals-core

1.14.4preactjs/signals

Manage state with style in every framework

Release timeline

33 releases since 2022
2023202420252026

Releases

  1. 1.14.47 Jul 2026
    Release notes2 sources agree

    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.

    Open source →
  2. 1.14.316 Jun 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  3. 1.14.211 May 2026
    Release notes2 sources agree

    Patch Changes

    Open source →
  4. 1.14.131 Mar 2026
    Release notes2 sources agree

    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.

    Open source →
  5. 1.14.08 Mar 2026
    Release notes2 sources agree

    Minor Changes

    • #891 308c921 Thanks @JoviDeCroock! - Prevent batches where a signal goes from A --> B --> A from triggering dependent updates, a computed/effect should not re-run when the dependencies in a batched update amount to an equal value.
    Open source →
  6. 1.13.04 Feb 2026
    Release notes2 sources agree

    Minor Changes

    • #812 19ac39b Thanks @andrewiggins! - Add createModel and action to signals core package

      createModel provides a structured way to create reactive model classes that encapsulate signals, computed values, and actions:

      const CounterModel = createModel((initialCount = 0) => {
      	const count = signal(initialCount);
      	const doubled = computed(() => count.value * 2);
      
      	effect(() => {
      		console.log("Count changed:", count.value);
      	});
      
      	return {
      		count,
      		doubled,
      		increment() {
      			count.value++;
      		},
      	};
      });
      
      const counter = new CounterModel(5);
      counter.increment(); // Updates are automatically batched
      counter[Symbol.dispose](); // Cleans up all effects
      

      Key features:

      • Factory functions can accept arguments for initialization
      • All methods are automatically wrapped as actions (batched & untracked)
      • Effects created during model construction are captured and disposed when the model is disposed via Symbol.dispose
      • TypeScript validates that models only contain signals, actions, or nested objects with signals/actions

      action is a helper that wraps a function to run batched and untracked:

      const updateAll = action(items => {
      	items.forEach(item => item.value++);
      }); // All updates batched into single notification
      
    Open source →
  7. 1.12.220 Jan 2026
    Release notes

    Patch Changes

    Open source →
  8. 1.12.123 Aug 2025
    Release notes2 sources agree

    Patch Changes

    Open source →
  9. 1.12.019 Aug 2025
    Release notes

    Minor Changes

    Open source →
  10. 1.11.029 Jun 2025
    Release notes2 sources agree

    Minor Changes

    • #706 4045d2d Thanks @marvinhagemeister! - feat: support disposing effect() with resource management

      This allows effect()'s to be disposed with the new using keyword from the explicit resource management proposal.

      Whenever an effect goes out of scope the Symbol.dispose function is called automatically.

      const count = signal(0);
      
      function doSomething() {
      	// The `using` keyword calls dispose at the end of
      	// this function scope
      	using _ = effect(() => {
      		console.log(count.value);
      		return () => console.log("disposed");
      	});
      
      	console.log("hey");
      }
      
      doSomething();
      // Logs:
      //  0
      //  hey
      //  disposed
      
    Open source →
  11. 1.10.011 Jun 2025
    Release notes2 sources agree

    Minor Changes

    Open source →
  12. 1.9.029 May 2025
    Release notes2 sources agree

    Minor Changes

    Patch Changes

    Open source →
  13. 1.8.04 Aug 2024
    Release notes2 sources agree

    Minor Changes

    • #587 cd9efbb Thanks @JoviDeCroock! - Adjust the ReadOnlySignal type to not inherit from Signal this way the type can't be widened without noticing, i.e. when we'd have

      const sig: Signal = useComputed(() => x);
      

      We would have widened the type to be mutable again, which for a computed is not allowed. We want to provide the tools to our users to avoid these footguns hence we are correcting this type in a minor version.

    Open source →
  14. 1.7.06 Jul 2024
    Release notes2 sources agree

    Minor Changes

    • #578 931404e Thanks @JoviDeCroock! - Allow for passing no argument to the signal and the type to be automatically inferred as T | undefined
    Open source →
  15. 1.6.112 Jun 2024
    Release notes2 sources agree

    Patch Changes

    • #558 c8c95ac Thanks @jviide! - Restore stricter effect callback & cleanup function types
    Open source →
  16. 1.6.019 Mar 2024
    Release notes2 sources agree

    Minor Changes

    Patch Changes

    Open source →
  17. 1.5.17 Dec 2023
    Release notes

    1.5.1

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    Open source →
  18. 1.5.08 Sept 2023
    Release notes

    Minor Changes

    • #964 8d5adb1 Thanks @JoviDeCroock! - Add Performance Insights for instance-level update hotspots and explicitly instrumented no-output-change computed recomputations.
    Open source →
    Additional notes

    1.5.0

    Minor Changes

    • #405 9355d96 Thanks @JoviDeCroock! - Add unique identifier to every Signal, this will be present on the brand property of a Signal coming from either signal() or computed()
    Open source →
    Additional notes

    Minor Changes

    • #405 9355d96 Thanks @JoviDeCroock! - Add unique identifier to every Signal, this will be present on the brand property of a Signal coming from either signal() or computed()
    Open source →
  19. 1.4.02 Aug 2023
    Release notes

    Minor Changes

    Open source →
    Additional notes

    1.4.0

    Minor Changes

    • #380 256a331 Thanks @XantreGodlike! - Add untracked function, this allows more granular control within effect/computed around what should affect re-runs.
    Open source →
    Additional notes

    Minor Changes

    • #380 256a331 Thanks @XantreGodlike! - Add untracked function, this allows more granular control within effect/computed around what should affect re-runs.
    Open source →
  20. 1.3.129 Jun 2023
    Release notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • #373 8c12a0d Thanks @rschristian! - Removes package.json#exports.umd, which had invalid paths if they were ever to be consumed
    • #359 26f6526 Thanks @andrewiggins! - Change effect callback return type from void to unknown. Same for effect cleanup function.
    Open source →
  21. 1.3.011 Apr 2023
    Release notes

    Minor Changes

    • #578 931404e Thanks @JoviDeCroock! - Allow for passing no argument to the signal and the type to be automatically inferred as T | undefined

    Patch Changes

    Open source →
    Additional notes

    Minor Changes

    Patch Changes

    Open source →
  22. 1.2.329 Dec 2022
    Release notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    Open source →
  23. 1.2.213 Oct 2022
    Release notes

    1.2.2

    Patch Changes

    • #415 79efe32 Thanks @prinsss! - Fix error when using useSignal with UMD builds of @preact/signals.
    Open source →
    Additional notes

    Patch Changes

    • #232 aa4cb7b Thanks @jviide! - Simplify effect change checking (and make effect cycle detection more accurate as a side-effect)

    • #233 3f652a7 Thanks @jviide! - Simplify Node book keeping code

    Open source →
    Additional notes

    Patch Changes

    • #232 aa4cb7b Thanks @jviide! - Simplify effect change checking (and make effect cycle detection more accurate as a side-effect)
    Open source →
  24. 1.2.11 Oct 2022
    Release notes

    Patch Changes

    Open source →
    Additional notes

    1.2.1

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • #238 bcf4b0b Thanks @eddyw! - Fix ERR_UNSUPPORTED_DIR_IMPORT error when importing use-sync-external-store/shim from ESM build
    Open source →
    Additional notes

    Patch Changes

    • #205 4b73164 Thanks @jviide! - Use the same tracking logic for both effects and computeds. This ensures that effects are only called whenever any of their dependencies changes. If they all stay the same, then the effect will not be invoked.

    • #207 57fd2e7 Thanks @jviide! - Fix effect disposal when cleanup throws

    • #209 49756ae Thanks @jviide! - Optimize dependency value change checks by allowing earlier exists from the loop

    Open source →
    Additional notes

    Patch Changes

    • #205 4b73164 Thanks @jviide! - Use the same tracking logic for both effects and computeds. This ensures that effects are only called whenever any of their dependencies changes. If they all stay the same, then the effect will not be invoked.
    • #209 49756ae Thanks @jviide! - Optimize dependency value change checks by allowing earlier exists from the loop
    Open source →
  25. 1.2.021 Sept 2022
    Release notes

    1.2.0

    Minor Changes

    • #387 6e4dab4 Thanks @XantreGodlike! - 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.
    Open source →
    Additional notes

    Minor Changes

    Patch Changes

    Open source →
    Additional notes

    This release improves performance of signals across all measurements. We want to especially highlight @jviide 's work in #161 here as it did outstanding strides on reducing memory usage, improving performance and ending up making signals one (if not the) fastest reactive library at the time of this writing 🎉

    Minor Changes

    • #183 79ff1e7 Thanks @jviide! - Add ability to run custom cleanup logic when an effect is disposed.

      effect(() => {
        console.log("This runs whenever a dependency changes");
        return () => {
          console.log("This runs when the effect is disposed");
        });
      });
      
    • #170 3e31aab Thanks @jviide! - Allow disposing a currently running effect

    Patch Changes

    • #188 b4611cc Thanks @jviide! - Fix .subscribe() unexpectedly tracking signal access

    • #162 9802da5 Thanks @developit! - Add support for Signal.prototype.valueOf

    • #161 6ac6923 Thanks @jviide! - Remove all usages of Set, Map and other allocation heavy objects in signals-core. This substaintially increases performance across all measurements.

    Open source →
    Additional notes

    Minor Changes

    • #183 79ff1e7 Thanks @jviide! - Add ability to run custom cleanup logic when an effect is disposed.

      effect(() => {
        console.log("This runs whenever a dependency changes");
        return () => {
          console.log("This runs when the effect is disposed");
        });
      });
      

    Patch Changes

    • #161 6ac6923 Thanks @jviide! - Remove all usages of Set, Map and other allocation heavy objects in signals-core. This substaintially increases performance across all measurements.
    Open source →
  26. 1.1.115 Sept 2022
    Release notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • #143 f2ba3d6 Thanks @Pauan! - Simplify batch() to use a single flag instead of a counter
    • #148 b948745 Thanks @marvinhagemeister! - Move types field in package.json to the top of the entry list to ensure that TypeScript always finds it.
    • #149 00a59c6 Thanks @marvinhagemeister! - Fix invalidated signals inside batch() not being refreshed when read inside a batching operation. This fixes a regression.
    Open source →
  27. 1.1.013 Sept 2022
    Release notes

    Minor Changes

    Patch Changes

    Open source →
    Additional notes

    Minor Changes

    Open source →
    Additional notes

    Minor Changes

    • bc0080c: experimental: Add .subscribe()-method to signals to add support for natively using signals with Svelte - #134 @marvinhagemeister

    Patch Changes

    • 336bb34: Don't mangle Signal class name - #100 @marvinhagemeister
    • 7228418: Fix incorrectly named variables and address typos in code comments. - #129 @elliotwaite
    • 32abe07: Fix internal API functions being able to unmark non-invalidated signals - #112 @marvinhagemeister
    • 4782b41: Fix conditionally signals (lazy branches) not being re-computed upon activation - #127 @marvinhagemeister
    • bf6af3b: Fix a memory leak when computed signals and effects are removed - #117 @developit
    Open source →
    Additional notes

    Minor Changes

    • bc0080c: Add .subscribe()-method to signals to add support for natively using signals with Svelte

    Patch Changes

    • 336bb34: Don't mangle Signal class name
    • 7228418: Fix incorrectly named variables and address typos in code comments.
    • 32abe07: Fix internal API functions being able to unmark non-invalidated signals
    • 4782b41: Fix conditionally signals (lazy branches) not being re-computed upon activation
    • bf6af3b: - Fix a memory leak when computed signals and effects are removed
    Open source →
  28. 1.0.17 Sept 2022
    Release notes

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • 62439c9: Fixes invalid React peer dependency range for environments with strict peerDeps - #105 @rschristian
    Open source →
    Additional notes

    Patch Changes

    • 5644c1f: Fix stale value returned by .peek() when called on a deactivated signal.
    Open source →
  29. 1.0.05 Sept 2022
    Release notes

    Minor Changes

    Patch Changes

    Open source →
    Additional notes

    Major Changes

    • 2ee8489: The v1 release for the signals package, we'd to see the uses you all come up with and are eager to see performance improvements in your applications.

    Minor Changes

    • ab22ec7: Add .peek() method to read from signals without subscribing to them.

    Patch Changes

    • b56abf3: Throw an error when a cycle was detected during state updates
    Open source →
  30. 0.0.52 Sept 2022
    Release notes

    Patch Changes

    • 702a9c5: Update TypeScript types to mark computed signals as readonly
    Open source →
  31. 0.0.424 Aug 2022
    Release notes

    Patch Changes

    • 4123d60: Fix TypeScript definitions not found in core
    Open source →
  32. 0.0.324 Aug 2022
    Release notes

    Patch Changes

    • 1e4dac5: Add prepublishOnly scripts to ensure we're publishing fresh packages
    Open source →
  33. 0.0.224 Aug 2022
    Release notes

    0.0.2

    Patch Changes

    Open source →
    Additional notes

    Patch Changes

    • 2181b74: Add basic signals lib based of prototypes
    Open source →