Redux Lite Action
Install
Install via npm npm install redux-lite-action
or yarn yarn add redux-lite-action
.
Typescript typings are includes into package.
Usage
Redux lite action solves issues that you need to define redux action names mutation functions separately.
redux-lite-action
whats to simplify that process in just writing the mutation functions which can
be used as a action.
For example lets create a simple reducer which couple actions.
Reducer file.
; ; ; ; // you can not pass payload then it will be treated as undefined// and then when calling action you will not need to pass argument.// also note that name cal be passed as a parameter; ;
Some point here you use your action.
; dispatchmutationActionA;dispatchmutationActionB;// since payload is not defined then we do// not need it to pass as a paramdispatchmutationActionC;