File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 9.4.0
4+
5+ ### Noticeable changes
6+
7+ - Exposed lifecycle actions under ` microcosm/lifecycle ` . See the
8+ upgrading section for more notes.
9+
10+ ### Internal changes
11+
12+ - ` getInitialState ` , ` serialize ` , and ` deserialize ` are now triggered
13+ by actions. We call them _ lifecycle actions_ . Their associated
14+ counterparts are ` willStart ` , ` willSerialize ` , and
15+ ` willDeserialize ` . There is no obligation to use these lifecycle
16+ actions, the store methods should work all the same.
17+
18+ ### Upgrading
19+
20+ This version adds lifecycle actions. This does not make any breaking
21+ change to the Microcosm API, however it provides us better internal
22+ consistency.
23+
24+ These lifecycle actions are still undergoing development (names may
25+ change, etc, but we'll keep you posted). However if you would like to
26+ give them a spin, consider the following code example:
27+
28+ ``` javascript
29+ import { willStart } from ' microcosm/lifecycle'
30+ import { addPlanet } from ' actions/planets'
31+
32+ const Planets = {
33+ reset () {
34+ return []
35+ },
36+ add (records , item ) {
37+ return records .concat (item)
38+ },
39+ register () {
40+ return {
41+ [willStart] : Planets .reset ,
42+ [addPlanet] : Planets .add
43+ }
44+ }
45+ }
46+ ```
47+
348## 9.3.0
449
550### Noticeable changes
You can’t perform that action at this time.
0 commit comments