Create an object which can be used to specify action names when using redux promise middleware.
Installation
You need to install this library as well as redux-promise-middleware.
npm install redux-promise-action-util redux-promise-middleware
Include redux-promise-middleware when you create your store:
; composeStoreWithMiddleware = createStore;
Usage
in your action file generate a new action object
;
create a new action as follows, you can pass a prefix for the actual action name as the optional second argument
const GET_DATA = 'GET_DATA' 'app/section'
and use it in your acrtion creator as follows
const getData =
in your reducer you can call it as
case GET_DATAPEDNING: case GET_DATAFULFILLED: case GET_DATAREJECTED:
in your test cases