an action without payload export const opened = createAction('[Products Page] Opened'); ./ defining an action with payload using the `props` function export const paginationChanged = createAction( '[Products Page] Pagination Changed', props<{ page: number; offset: number }>() );
an action without payload export const opened = createAction('[Products Page] Opened'); ./ defining an action with payload using the `props` function export const paginationChanged = createAction( '[Products Page] Pagination Changed', props<{ page: number; offset: number }>() ); ./ defining an action with payload using the props factory export const queryChanged = createAction( '[Product Page] Query Changed', (query: string) .> ({ query }) );
ProductsPageActions = createActionGroup({ source: 'Products Page', events: { ./ defining an event without payload using the `emptyProps` function Opened: emptyProps(), }, });
const ProductsPageActions = createActionGroup({ source: 'Products Page', events: { ./ defining an event without payload using the `emptyProps` function Opened: emptyProps(), ./ defining an event with payload using the `props` function 'Pagination Changed': props<{ page: number; offset: number }>(), }, });
const ProductsPageActions = createActionGroup({ source: 'Products Page', events: { ./ defining an event without payload using the `emptyProps` function Opened: emptyProps(), ./ defining an event with payload using the `props` function 'Pagination Changed': props<{ page: number; offset: number }>(), ./ defining an event with payload using the props factory 'Query Changed': (query: string) .> ({ query }), }, });