Create Reducer
Parameters#
| Name | Required | Type | Description |
|---|---|---|---|
| actions | true | - | Actions object |
| defaultState | true | Object | Default state value |
const defaultState = {}
const actions = { action1: yourAction}
createReducer(actions, defaultStatus) Note After creating the reducer, the actions are registered and after that they will be available in
useActionshook
const { action1 } = useActions()