Redux Module
Last updated
Last updated
This prefix will be setted on all actions in this module environment
Type
Required
Default value
string
Yes
-
The default data for current state
Type
Required
Default value
Object
No
null
This object is for setting the server response.
Default ResponseMapProps
For example:
Type
Required
Default value
Object
No
RespnseMapProps
The name of the key in which the data will be stored
Type
Required
Default value
string
No
data
Type
Required
Default value
string
No
Depends on the action
This parameter should be used only when using one of this methods createAddAction, createUpdateAction, createDeleteAction . This property is intended to find the desired item by some identifier.
Type
Required
Default value
string
optional
-
This is an API call function, that returns a Promise (required). If you want to update the store without a request to the server you can skip this property. For the store update you need to send data the first argument of the action function.
For example
Type
Required
Default value
function
No
-
When no needed have status parameters.
Type
Required
Default value
boolean
No
-
When the server response have not structure and needed get all response data you can use this property.
Type
Required
Default value
boolean
No
-
When there is no need to store updates after a request to the server.
Type
Required
Default value
boolean
No
-
When need use custom logic for response processing.
Type
Required
Default value
Arguments
function
No
-
(response: Object)
When need use custom action or dispatch other actions.
Type
Required
Default value
Arguments
function
No
-
(dispatch: Function, callFunctionArguments: Array, actionType: string)
When need call function after success response.
Type
Required
Default value
Arguments
function
No
-
(response: Object, dispatch: Function)
The action name. Default value depends on the action type, for example if you use default value will be CREATE