Releases: vigetlabs/microcosm
Version 9.18.0
- When registered, the
options
argument of plugins default to an empty object. - Added warning when a Store's registration method is configured to listen to a particular action, however it is undefined. The message should read "Store for [key] is registered to [action], but the handler is undefined!"
- Upgraded patch release of Diode that fixed strange compilation issues with Babel 5.x in a Node environment.
v9.17.0
Plugins no longer require a next
argument. For example, consider:
function Plugin (app, options, next) {
app.listen(function() {
console.log("I changed!")
})
next()
}
This plugin is entirely synchronous, yet relies on next()
to advance plugin installation forward. As of this release, omitting the next
argument causes a plugin to be synchronously processed:
function Plugin (app, options) {
app.listen(function() {
console.log("I changed!")
})
}
This is not mandatory, and designed to streamline simple plugins.
v9.16.0
v9.15.2
v9.15.1
v9.15.0
- Fix bug where history would not completely flush all transactions,
causing store handlers to fire twice. start()
must be invoked
Potentially breaking changes
In a previous update, we made a change that allowed instances of microcosm to work without invoking start()
. This update reverts that decision. Without intentionaly invoking start, transactional state becomes hard to predict. This is potentially a breaking change; for those upgrading, verify that you are calling start
before using a microcosm.
v9.14.1
v9.14.0
Noticeable Changes
We improved the validation of stores to help improve debugging of bad inputs to Microcosm::addStore
.
Internal Changes
- Small change to dispatch process so that accessing state only happens when necessary. This should provide a small performance boost.
v9.13.1
v9.13.0
Noticeable Changes
Microcosm::addStore
mounts stores to a given key path, like:app.addStore([ 'path', 'to', 'key' ], Store)
. Additionally, adding a store without a keypath will mount it to the entire application state. This is to improve the useability of Stores that must operate all state (such as make decisions about game state).- Renamed
setFocus
tocheckout
in internal Tree structure. This is a breaking change. The goal is to move towards a more intuitive API. - Tweaked build process to prevent babel compilation errors when developing for React Native development.
Upgrading
The enhancement Microcosm::addStore
is not a breaking change, all ld use cases will continue to work.
Those experimenting with app.history
will need to rename calls to setFocusto
checkout`.