Changelog
0.17.2
Add onMount
handler for AltContainer. commit
Expose a reduce function for every store by default. commit
If you're using reducers then this allows you to not ever use waitFor since you can just call store.reduce(store.getState(), payload) in order to derive data.
Allow values for store state. commit
this.state can now be any valid JS value rather than always being an object.
Add some reducer utils. commit
These reducer utils can be used for easily working with reducer only stores
Return value from sources local method. commit
Delete stores on hot reload. commit
Working with react hot loader is now simpler.
Make fp tools faster by pulling directly from state. commit
Throw if listen does not get a function. commit
Change the connectToStores displayName. commit
Allow listening to same action with multiple methods. commit
Changelog
0.17.0
Removed Symbol
Upgrade Guide
myAction.id
Removed getEventEmitter()
Upgrade Guide
class TodoStore {
constructor() {
this.eventEmitter = new EventEmitter()
this.exportPublicMethods({
getEventEmitter: () => this.eventEmitter
});
}
}
Removed _storeName
.
Upgrade Guide
_storeName
was an internal property to the store where the store's name was kept.displayName
instead which is a public API.Removed stateKey
. commit
Upgrade Guide
stateKey
property was configurable on stores as well as app level.this.state
, now this is being supported first-class.// old behavior
class MyStore {
static config = { stateKey = 'state' }
constructor() {
this.state = {}
}
}
Now you can just use this.state
directly. If it exists it'll be picked up.
// old behavior
class MyStore {
constructor() {
this.state = {}
}
}
The old behavior of assigning state directly as instance properties will continue to be supported. However, this new behavior will be favored in the docs.
Render.toString/toStaticMarkup now return an object rather than a string of html.
Note: Render API is still in flux
Upgrade Guide
// old
Render.toString(App, props).then(markup => console.log(markup))
// new
Render.toString(App, props).then(obj => console.log(obj.html))
Render.toDOM no longer locks by default.
Upgrade Guide
// old
Render.toDOM(App, props, document.getElementById('react-root'))
// new
// the `true` is to not fetch client side.
Render.toDOM(App, props, document.getElementById('react-root'), true)
this.dispatch
.Changelog
0.16.9
preventDefault
to stop a store from emitting a change. commit
observe()
a way for POJOs to observe for changes. commit
otherwise()
listen to all dispatches that have not been bound in your stores. commit
reduce()
listen to all dispatches in a store and return the new state. commit
output()
transform the output that is emitted from the stores. commit
Proper server rendering resolving all data at the component level before rendering. commit
Batched dispatches to avoid having componentWillMount cause a cannot dispatch while dispatching error when it loses context. commit
Alt.debug for registering your alt instance with chrome dev tools. commit
Function utils for transforming store state. commit