github infernojs/inferno v7.0.0
Inferno v7.0.0

latest releases: v8.2.3, v8.2.2, v8.2.1...
5 years ago

Inferno core

This release changes how inferno queues setState calls. In earlier versions (v6 and before) Inferno used Component's instance to keep track of its updating state. However this pattern failed when child component called parent method or raised an event which lead parent to do setState during child's update lifecycle.

This has been fixed by moving update detection outside Component instance. Because of this change, setState calls will get more aggressively put into the micro task queue. This is a breaking change for applications which expected setState to render synchronously.

If your application code depends on the changed state, you can use setState callback to track when state has changed. Or if synchronous execution is necessary, you can call rerender() method which flushes all pending setState calls. This method should be generally avoided because it can cause infinite loops. It is useful for example in testing purposes to avoid setTimeout.

Due to this change version has been increased to 7.

Don't miss a new inferno release

NewReleases is sending notifications on new releases.