This is the first release candidate for the next major version! Please help the community by testing it out!
You can install this version using the following command. Use same version for all packages
npm install --save inferno@6.0.0-rc.0
JSX users also need to update babel plugin, Note that babel v7 is now required. See their documentation for help in migration: https://babeljs.io/docs/en/v7-migration
npm install --save babel-plugin-inferno@6.0.0-5
This release includes the following tickets:
https://github.com/infernojs/inferno/issues?q=is%3Aissue+is%3Aopen+label%3A%22Fixed+in+v6.0.0%22
Fragments
You can now render arrays from Component render methods, or root level.
See test cases for documentation: https://github.com/infernojs/inferno/blob/master/packages/inferno/__tests__/fragments.spec.jsx
Or React doc: https://reactjs.org/docs/fragments.html
New lifecycle:
getDerivedStateFromProps
getSnapshotBeforeUpdate
New optimization flag:
$HasTextChildren
, this flag can be used if vNode contains only single text children
Breaking change:
componentDidUpdate
triggers later in lifecycle orderstyle={{backgroundColor: 'red'}} => style={{"background-color": "red"}}
- legacy
string ref
is removed from Inferno - Hydration is now in its own package, and needs to be called manually. See
inferno-hydrate
https://github.com/infernojs/inferno/tree/master/packages/inferno-hydrate
And more, see Github tickets for all changes. Complete documentation will come later.