microcosm
Advanced tools
Changelog
9.6.0
deserialize
lifecycle method is now provided the entire raw
state as the action parameters. This means that it is now available
as the second argument in store callbacks.serialize
lifecycle method is now provided the
entire app state in the action. This means that it is now available
as the second argument in store callbacks.app.push
for better
optimizationflatten
for better optimizationasync
utility to coroutine
There are no breaking changes for this release.
Changelog
9.4.1
Changelog
9.4.0
microcosm/lifecycle
. See the
upgrading section for more notes.getInitialState
, serialize
, and deserialize
are now triggered
by actions. We call them lifecycle actions. Their associated
counterparts are willStart
, willSerialize
, and
willDeserialize
. There is no obligation to use these lifecycle
actions, the store methods should work all the same.This version adds lifecycle actions. This does not make any breaking change to the Microcosm API, however it provides us better internal consistency.
These lifecycle actions are still undergoing development (names may change, etc, but we'll keep you posted). However if you would like to give them a spin, consider the following code example:
import { willStart } from 'microcosm/lifecycle'
import { addPlanet } from 'actions/planets'
const Planets = {
reset() {
return []
},
add(records, item) {
return records.concat(item)
},
register() {
return {
[willStart]: Planets.reset,
[addPlanet]: Planets.add
}
}
}
Changelog
9.3.0
Changelog
9.2.0
register
property is a
function. If this property is not present, it will skip this
validation and continue to the next plugin.is-generator
package to reduce dependencies and cut
some dead code.All changes are purely internal polish. There should be no additional required action. The build is about 100 bytes smaller, but who's counting? :)
Changelog
9.1.0