Skip to content

Commit a9a189d

Browse files
committed
Update changelog with 9.4.0
1 parent 1ec53f4 commit a9a189d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
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

0 commit comments

Comments
 (0)