Packages

preact

11.2.0 · 6 Nov 2026MIT63.2M / weekRepositoryHomepagenpmAtom feed

Your version

10.16.0

9 Jul 2023Where it was published

10.29.8 is the newest release of 10.x.

In short

1 new5 fixed2 changed

Release note

Improved child diffing

We have noticed a few scenario's where children would get unmounted and remounted eagerly due to some offset bugs in our child-diffing, with skew-based diffing we plan to address those. This is already part of v11 and has been introduced there

Defer setting refs

We used to set refs as part of the children, synchronously this caused several issues when a ref would go down a level, i.e. the following example

const App = () => {
  return phase === 1 ? <div ref={x}><p>Foo</p></div> : <div><div ref={x}><p>Foo</p></div>
}

In this example when we go from phase 1 to phase 2 we would mount a new ref but only after we bubble back up diffing clean up the outer ref making the ref reset to null.

Fixes

Types

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.