See release 10.0.0-alpha.0 for a full list.
h
->createElement
VNode.nodeName
->VNode.type
VNode.attributes
->VNode.props
VNode.children
->VNode.props.children
require('preact/devtools')
->require('preact/debug')
preact-compat
->preact/compat
render
signature changed- see explanation in release notes
- JSX Attribute
style
no longer supported asstring
, must beobject
. children
no longer guarenteed to be Array:- you can get the old behavior by using the new
toChildArray
export from Preact
- you can get the old behavior by using the new
preact-portal#Portal
->preact/compat#createPortal
preactjs/migrate-preact-x
was very helpful.
preact-virtual-list
- PR Created by Hydrophobefireman: developit/preact-virtual-list#8
preact-jsx-chai
- PR Created: developit/preact-jsx-chai#69
- This PR blocks all others below
preact-18n
- PR Created: synacor/preact-i18n#33
preact-markup
- PR Created: developit/preact-markup#26
preact-context-provider
- PR Created: synacor/preact-context-provider#7
preact-router@3
- Done
The following pattern will need to be changed:
// Preact 8:
<button onClick={active && this.handleClick}>My Button</button>
// Preact X:
<button {...active && { onClick: this.handleClick }}>My Button</button>
// Preact 8
assert(typeof preact.h('span').constructor === 'function')
// Preact X
assert(typeof preact.createElement('span').constructor === 'undefined')
Tip: