6.0.0 (2021-12-19)
- Angular 13
- upgrade Angular 13 (308414d)
- adjust slice and entity to ngrx13 (4295601)
- update peer dependencies (9c46e4b)
5.0.0 (2021-10-22)
- generated actions for AsyncCaseReducer are now correctly generated with the type of cases provided, not all 5
const { actions } = createSlice({
name: 'foo',
initialState,
reducers: {
foo: {
success: state => state,
trigger: noopReducer()
}
}
});
// before
assert(Object.keys(actions.foo).length === 5); // Actions for all 5 cases are generated
// after
assert(Object.keys(actions.foo).length === 2); // Only the "success" and "trigger" cases are generated
- only generate correct amount of async case actions (c250f2a)
- remove scully plugins folder (de0a678)
4.0.0 (2021-09-27)
// before
TodoActions.toggleComplete({
update: {
id: todo.id,
changes: { completed: !todo.completed }
}
});
// after
TodoActions.toggleComplete({
id: todo.id,
changes: { completed: !todo.completed }
});
- entity: check if arg is object for payloadAction (eb8bfbb)
3.1.1 (2021-09-10)
- PayloadAction type (62e56e6)
3.1.0 (2021-09-02)
- port strings utils from angular to support classify instead of capitalize (4e1e4cb)
3.0.0 (2021-08-27)
- entity: Dictionary no longer has undefined defined
// before
state.entities[id]; // returns entity or undefined
// after
state.entities[id]; // returns entity
You should make sure that it is IMPOSSIBLE
to access the entity at some given id
if the entity
is undefined. Eg: via UI, undefined entity shouldn't be rendered.
- noopReducer usage has been simplified. The type parameters (
ActionProps
andSliceState
) have been switched
// before
noopReducer<TodoState, { filter: Filter }>();
noopReducer<TodoState>();
// after
noopReducer<{filter: Filter}>();
noopReducer();
2.2.0 (2021-08-26)
- entity: add createSliceEntityAdapter (4d68582)
2.1.1 (2021-07-19)
- use proper type fo createSliceAction (d8334fd)
2.1.0 (2021-06-28)
- add createNamespacedSlice in addition to createSlice (71ef0f1)
- clean up docs (9bbe224)
2.0.0 (2021-06-28)
createSlice
now returns a more opinionated object based on thename
of the Slice.
// before
export const {actions, selectors, name, reducer} = createSlice({name: 'counter'})
// after
export const {CounterActions, CounterSelectors, CounterFeature} = createSlice({name: 'counter'})
name
of SliceOptions
is now utilized to make the return type of createSlice
to have better namespacing.
This has the downside of the name
has to be camelCase
.
typedNoopReducer
has been removed. UsenoopReducer
instead
// before
noopReducer<CounterState>();
typedNoopReducer<CounterState, {multiplier: number}>();
// after
noopReducer<CounterState>();
noopReducer<CounterState, {multiplier: number}>();
- clean up API (95312f6)
1.1.0 (2021-06-11)
- extract Async Action types to an const array (519c336)
- update docs about clear and cancel async case reducer (0b339b0)
- use tuiLink for links and adjust Counter Example docs (26e51a6)
1.0.1 (2021-06-06)
- add docs application and taiga ui (6451339)
- add scully (b8a23dc)
- adjust docs import (7d435f1)
- basic documentations added (9cd410c)
- finish docs (8abb8dc)
- bump version (684b01c)
- change AppState from unknown to any. ngrx uses object as store type (8d79352)
- change AppState from unknown to any. ngrx uses object as store type (f5bd2ea)
- change PayloadAction from unknown to any (366c988)
- change PayloadAction from unknown to any (958691f)
- fix payloadAction typings (9a46fe3)
- fix typedNoopReducer type (a234342)
- fix typings around payload action (a876d32)
- remove NonOptional type (9a9b191)