Releases: infernojs/inferno
Inferno v4
Inferno v4
In this release we have reworked Inferno's normalization process. In the previous versions Inferno always normalized all input, meaning it looped through all the vNode children checking for invalid nodes, flattening nested arrays etc. This process costs O(n) runtime, where n is number of input nodes. This has been improved by adding more logic into our babel plugin to detect static shapes compile time. Inferno will now normalize only dynamic shapes and even those can be avoided by pre-defining children shape using childFlags
.
Breaking changes
There is v3 to v4 migration documentation available here
New features
{Inferno.createPortal(vNode, DOM)}
can be used to render vNode to external location in DOM- Router has been updated to v4 to match React Router v4 API
- Mobx and Redux integrations have been ported to the latest version
- new VNodeFlag
ReCreate
has been added. It can be used to always re-create element instead of diffing it. - defaultHooks has been added to Functional Components
- Inferno now supports IE9+ without polyfills reducing
- Inferno size has been reduced to 7.8kb gzip including the ES2015 Component!
- Small performance improvements
function Static() {
return <div>1</div>;
}
Static.defaultHooks = {
onComponentShouldUpdate() {
return false;
}
}
export const Com = Static;
- TouchEvents are now part of Synthetic event system
Common changes:
All Inferno properties follow the same naming convention.
JSX Flags
NoNormalize
has been removed, and is replaced by $HasVNodeChildren
hasKeyedChildren
=> $HasKeyedChildren
hasNonKeyedChildren
=> $HasNonKeyedChildren
ES6 Component properties that are considered private are now $
- prefixed.
Normalization process generated keys are now $
- prefixed.
Bug Fixes
-
XSS vulnerability has been fixed in
inferno-server
package -
dangerouslySetInnerHTML
now correctly unmounts previous nodes -
hundreds of new tests have been added to
inferno-compat
New website
We have also updated our Website https://infernojs.org/! If you have built something for inferno you can now add it there to utilities section 🥇
Open collective
InfernoJS is now part of open collective program, please consider supporting us!
Inferno 3.10.1
Core
- Fixes issue in Internet explorer where synthetic events propagate through disabled element
Inferno 3.10.0
This is maintenance release, since it will take for a while before next major version is ready. This release includes bunch of commits from development branch.
Core
- All internal dependencies are updated 2c11f63
- es6 builds:
index.es.js
are now built using production mode b2b7a25 - Guard against external changes on text nodes #1207
- Port: process element flow to if - else structure 0628b08
Inferno Component
- Removes parentVNode recursion in favor of simple while loop 6bb02e8
- Guards againts setState callback being invalid object 5ff862f
Inferno Test utils
- Removed createElement dependency 2c11f63
Inferno Redux
- Removed createElement dependency 20c74e4
Inferno Server
- Fix passing context to render method 4e31950
Inferno 3.9.0
Inferno core
- Fixes crash where parent component removed child component during child's lifecycle event after returning null in
Component's
render - Small optimizations to keyed/non-keyed algorithms b93bcb2
- Changed to object literal in vNode creation for more reliable performance 62a544d
Inferno-server
- Optimized fast path in
escapeText
function 5a035c9
Inferno-component
- Changed setState type to allow partial updates d14fa5d
Inferno 3.8.2
All packages
Fixed bad build caused by rollup bug.
Inferno 3.8.1
Inferno-server
This release fixes XSS vulnerability in inferno-server
package when double quotes were used as text content. #1191
Inferno 3.8.0
Component
- Fixes bug where child context was created too early #1182
- Removed deprecated method
setStateSync
setState will replace it without any breaking changes - Fixes setState type #1189
Router - new feature: Async data fetching
See inferno-router
package README.md for full details bd33957 (https://github.com/infernojs/inferno/tree/master/packages/inferno-router#async-data-fetching)
Core
Fixes issue where HTML content was replaced with identical content using dangerouslySetInnerHtml
b8c14f7
Inferno 3.7.1
This release adds support for indeterminate check box state and minor performance optimizations.
Inferno 3.7.0
Inferno-core
- Fixes performance issue in
patchKeyedChildren
algorithm where DOM was manipulated more than needed #1169 - Functional component class methods now gets props passed into lifecycle hooks #654bcf5
Inferno-server
- Pass props / state / context to render method same way as its used on client side. #0ddd059
- Fixes bug where
value
property was not correctly rendered for select - option elements
Test-utils
renderToSnapshot
now correctly adds className 4c4b894
All files in the project were ran through prettier and packages updated plus other minor internal workflow changes
Inferno 3.6.4
Fixes bad build in inferno-redux
package. #1157
Build script was also modified to stop in case of errors to avoid regression in future.