Skip to content

Releases: preactjs/preact

6.0.2

07 Sep 17:14
Compare
Choose a tag to compare
  • Fix <input list="id"> when datalist element is placed after the input in the DOM (Issue #294, thanks @vutran!)
  • Fix HMR issue caused by recycling of a re-used Component base. (Issue #295, thanks @katopz!)

6.0.1

07 Sep 17:12
Compare
Choose a tag to compare
  • Make 6.x the official latest release!

6.0.0 (beta)

25 Aug 16:34
Compare
Choose a tag to compare
6.0.0 (beta) Pre-release
Pre-release
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

  • Discard keyed nodes when diffing children instead of allowing them to be reused unkeyed
  • 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
  • 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 (#260)
  • 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!)

5.7.0

18 Aug 03:42
Compare
Choose a tag to compare
  • Correct regression introduced in 5.6.0 where re-rendering components with the same root node could duplicate their DOM. Fixes #257.
  • Enforce this.props and this.context, even when a class improperly inherits from Component (eg: calls super() without forwarding arguments)
  • Fix for all empty vnodes ("", null, etc) rendering a comment - this should only occur when an empty vnode is returned from a component's render().
  • Make event handler "on" prefix case-insensitive

5.6.0

24 Jul 03:47
Compare
Choose a tag to compare

Features

  • When rendering null, a comment node will be inserted instead of an empty TextNode.
  • When using linkState() with components instead of DOM elements, use the first argument passed to the event handler as the default value unless a path is given.

Bug Fixes

  • Fix case where switching from a String to Object style value would attempt to assign numeric CSS properties to the element (#233)
  • Fix bug where using all lowercase event names would skip bypass binding implementation (but still mostly work)
  • Fix and test for double-nulling of refs when changing the type of a component's root DOM element (#243)
  • Fix IE bug caused by assigning to the nodeValue property of a TextNode that has been removed from the DOM.

5.5.0

24 Jul 03:45
Compare
Choose a tag to compare
  • Fix this.base not being unset when unmounting High-Order components (#239)

5.4.0

19 Jul 04:39
Compare
Choose a tag to compare

Features

5.3.2

19 Jul 04:37
Compare
Choose a tag to compare

Bug Fixes

5.3.1

19 Jul 04:36
Compare
Choose a tag to compare
  • Fix for erroneously recycled components

5.3.0

17 Jul 05:12
Compare
Choose a tag to compare

🎉 Preact 5 is here! 🎈

Version 5 represents a fairly major jump forward. It should be backwards-compatible, but major version increment is to signify a few new features that will not be made available in older versions - mainly built-in SVG support, and async rendering.

Take a few seconds and upgrade, you'll be happy you did! 🌈

Tip: If you're using preact-compat, it's best to upgrade that to 2.0.0 at the same time. Since Preact 5+ now includes built-in support for SVG, preact-compat@2 drops the preact-svg dependency, saving you around 1.7kb.


Along with the lovely stable stamp, this release includes some finishing touches:

Bug Fixes

  • Fix case where a ref may be nulled before a component is unmounted (#232, thanks @slmgc!)
  • Ensure remounting component trees invokes mount lifecycle events for deeply nested children (thanks to @kruczy @Madumo et al for their help with this!)

New Features

  • Style objects now have a lightning fast pipeline out to the DOM. (#228, thanks @trashhalo!)

    Example:
    <div style={{ foo:'bar '}} /> now diffs against the current style rather than stringifying the object