Packages

preact

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

Upgrading preact From 7.2.1 to 8.0.0

1 release in betweenevery note read

Reading releases, release notes and advisories…

Other targets from 7.2.1Latest11.2.0
  1. 7.2.1yours
  2. 8.0.0target
11
changes to make
0
advisories fixed
0
new
4
fixes

Before you upgrade

Tick each one off as you go
  • Breaking8.0.0
  • Breaking8.0.0
  • Breaking8.0.0
  • Breaking8.0.0
  • Breaking8.0.0
  • Breaking8.0.0
  • Breaking8.0.0
  • Breaking8.0.0
  • Breaking8.0.0
  • Breaking8.0.0

Release by release

  1. 8.0.0

    Migration needed6 Apr 20174 fixes
    • Breaking

      Pure Functional Components now have backing instances. This means key now works perfectly on PFC's. It also means you could use state and lifecycle methods in Functional Components... (#163, #517, #536, #586, #474)

    • Breaking

      linkState() has been removed from Preact itself. It is being published as a standalone linkstate module shortly.

    • Breaking

      class and className no longer serialize Object values to Strings. Instead, use classnames

    • Breaking

      preact/aliases is no longer necessary. createElement() is now an alias of h() right out of the box!

9 other lines we could not sort, mostly version bumps
  • Significantly increased performance - in some cases by 30%.

    8.0.0
  • Better compatibility - key for PFC's, class integrations, capturing events.

    8.0.0
  • Fewer edge cases - goodbye to unnecessary mounts and DOM hierarchy errors.

    8.0.0
  • Even smaller - Preact had been 3.9kb for a while - now it's 3.3kb (and headed for 2.9kb!)

    8.0.0
  • "holes" in JSX children are now preserved and used intelligently by the diff (#580, #540)

    8.0.0
  • Re-rendering a compositional child with a different key prop now triggers a remount

    8.0.0
  • JSX children passed to a Component are preserved rather than normalized

    8.0.0
  • Preact no longer relies on the Text or Array constructors for type checks, instead relying on duck typing (#595, #530)

    8.0.0
  • Ignore whitespace-only Text nodes during SSR hydration. SSR boot is now significantly faster than cold boot.

    8.0.0

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.