@ngrx/schematics
Advanced tools
Changelog
16.0.0 (2023-05-09)
<a name="16.0.0-rc.1"></a>
Changelog
16.0.0-rc.1 (2023-05-09)
<a name="16.0.0-rc.0"></a>
Changelog
16.0.0-beta.0 (2023-04-27)
any
type with unknown
type (#3827) (0ea2933)createActionGroup
function.BEFORE:
All letters of the event name will be lowercase, except for the initial letters of words starting from the second word, which will be uppercase.
const authApiActions = createActionGroup({
source: 'Auth API',
events: {
'LogIn Success': emptyProps(),
'login failure': emptyProps(),
'Logout Success': emptyProps(),
logoutFailure: emptyProps(),
},
});
// generated actions:
const { loginSuccess, loginFailure, logoutSuccess, logoutfailure } = authApiActions;
AFTER:
The initial letter of the first word of the event name will be lowercase, and the initial letters of the other words will be uppercase. The case of other letters in the event name will remain the same.
const { logInSuccess, loginFailure, logoutSuccess, logoutFailure } = authApiActions;
createFeature
signature with root state is removed in favor of a signature without root state.
An automatic migration is added to remove this signature.BEFORE:
interface AppState {
users: State;
}
export const usersFeature = createFeature<AppState>({
name: 'users',
reducer: createReducer(initialState /* case reducers */),
});
AFTER:
export const usersFeature = createFeature({
name: 'users',
reducer: createReducer(initialState /* case reducers */),
});
getSelectors
function has been removed from the @ngrx/router-store
package.BEFORE:
The @ngrx/router-store package exports the getSelectors
function.
AFTER:
The @ngrx/router-store package no longer exports the getSelectors
function. A migration has been provided to replace existing usage
any
types to define actions, these are replaced with the unknown
type.BEFORE:
Schematics used the any
type to declare action payload type.
AFTER:
Schematics use the unknown
type to declare action payload type.
getMockStore
function is removed in favor of createMockStore
BEFORE:
import { getMockStore } from '@ngrx/store/testing';
const mockStore = getMockStore();
AFTER:
import { createMockStore } from '@ngrx/store/testing';
const mockStore = createMockStore();
BEFORE:
Projector function arguments of selectors generated by createFeature are not strongly typed:
const counterFeature = createFeature({
name: 'counter',
reducer: createReducer({ count: 0 }),
});
counterFeature.selectCount.projector;
// type: (...args: any[]) => number
AFTER:
Projector function arguments of selectors generated by createFeature are strongly typed:
const counterFeature = createFeature({
name: 'counter',
reducer: createReducer({ count: 0 }),
});
counterFeature.selectCount.projector;
// type: (featureState: { count: number; }) => number
<a name="15.4.0"></a>
Changelog
15.4.0 (2023-03-16)
<a name="15.3.0"></a>
Changelog
15.2.0 (2023-01-26)
<a name="15.1.0"></a>
Changelog
15.1.0 (2022-12-21)
createActionGroup
with props typed as unions (#3713) (e75fa1a), closes #3712createSelector
with selectors dictionary (#3703) (5c87dda), closes #3677<a name="15.0.0"></a>