Packages

preact

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

Your version

6.0.0

major25 Aug 2016Where it was published

6.4.0 is the newest release of 6.x.

In short

3 breaking3 new5 fixed

  • Breaking

    Discard keyed nodes when diffing children instead of allowing them to be reused unkeyed

  • Breaking

    linkState() no longer falls back to components path lookups and no longer auto-invokes functions

  • Breaking

    Remove default empty options.vnode hook

Release note

npm install --save preact@beta

Features

  • Add support for SVG <foreignObject> (#278, thanks @amio!)

  • Add preact/aliases import: A copy of preact that includes a createElement() alias (#168/#274, thanks @ngasull!)

  • Switch to use event capturing for increased consistency with React (#266/#271, thanks @i-like-robots!)

Breaking Changes

  • Breaking

    Discard keyed nodes when diffing children instead of allowing them to be reused unkeyed

  • Breaking

    linkState() no longer falls back to components path lookups and no longer auto-invokes functions

    • These features were unused & poorly documented, and added extra weight

  • Breaking

    Remove default empty options.vnode hook

    • While this is technically a breaking change, very few people use this API

    • Simply perform an existence check on the previous hook prior to calling it

Bug Fixes

  • Fix and tests for regression in 5.7 that could cause nodes to be removed (related to #260/#277)

  • Fix initial render failing to reuse certain components when picking up from SSR

  • When swapping between Text, Comment and Element nodes, recycle whole orphaned trees

  • Prevent the recycler from collecting non-Element nodes 🐛

  • Switch back to the pre-5.7 case-sensitive on prefix for event handler props (#275, thanks @c2h5oh!)

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.