Releases: vigetlabs/microcosm
Releases · vigetlabs/microcosm
Version 1.0.0
This version adds many breaking changes to better support other libraries such as Colonel Kurtz and Ars Arsenal.
In summary, these changes are an effort to alleviate the cumbersome nature of managing unique instances of Actions and Stores for each Microcosm instance. 1.0.0 moves away from this, instead relying on pure functions which an individual instance uses to operate upon a global state object.
- Actions must now be tagged with
microcosm/tag
. For the time being, this is to provide a unique identifier to each Action. It would be nice in future versions to figure out a way to utilizeWeakMap
. - Stores are plain objects, no longer inheriting from
Store
base class. - Stores must implement a
toString
method which returns a unique id. - State for a store must now be accessed with:
microcosm.get(Store)
- Microcosms no longer require
addActions
, actions are fired withmicrocosm.send(Action, params)
- Removed
Microscope
container component. Just uselisten