Releases: ice-lab/icestore
Releases · ice-lab/icestore
v1.3.1
v1.3.0
- Feat: store.getModel(store.getModelState / store.getModelDispatchers)
- Feat: await effect
We've done a lot of refactoring in this version(#82), The following API has been detected:
- useModelActions
- Provider: initialStates
- Defining effects as object
Visit upgrade-guidelines.md#120-to-130 to learn how to upgrade.
v1.2.0
v1.1.2
v1.1.1
v1.1.0
- Added effects && reducers to define model;
- Added more documents: Upgrade Guidelines.
Change log
It is no longer recommended to use actions to define model, please use reducers && effects. #66
1.0.0:
const model = {
state: 0,
actions: {
increment:(prevState) => prevState + 1,
async decrementAsync(prevState, payload, actions) {
await delay(1000);
return prevState - 1;
},
},
};
1.1.0:
const model = {
state: 0,
reducers: {
increment:(prevState) => prevState + 1,
decrement:(prevState) => prevState - 1,
},
effects: {
async decrementAsync(state, payload, actions) {
await delay(1000);
actions.decrement();
},
},
};