Releases: preactjs/preact
6.0.2
6.0.1
6.0.0 (beta)
npm install --save preact@beta
Features
- Add support for SVG
<foreignObject>
(#278, thanks @amio!) - Add
preact/aliases
import: A copy of preact that includes acreateElement()
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
- 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
andthis.context
, even when a class improperly inherits fromComponent
(eg: callssuper()
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'srender()
. - Make event handler "on" prefix case-insensitive
5.6.0
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
5.4.0
Features
- #237 Imporving performance by inlining hook calls (thanks @trashhalo!)
- Disable rendering on unmount (thanks @Madumo!) [discussion]
5.3.2
5.3.1
5.3.0
🎉 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 thepreact-svg
dependency, saving you around1.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