Packages

@preact/signals

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

Your version

2.0.0

major17 Dec 2024Where it was published

2.11.4 is the newest release of 2.x.

In short

1 breaking1 new1 fixed

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

Release note

Major Changes

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

Minor Changes

  • Align signal effects with animation-frames for better performance

Patch Changes

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

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.