redux-ts-simple
Yet another lib for creating typed actions and reducers. This library is FSA-compliant.
Installing
npm install redux-ts-simple
Usage
action.ts
; // Define action creators;;; // Usagedispatchreset;dispatchincrement100;dispatchset; // Error and meta;;console.logfetchAction.error; // trueconsole.logfetchAction.meta.url; // /posts/1
reducer.ts
; ; .onreset, .onincrement, .onset, .onclear, wipe, // Several actions with same handler .elsestate // Extensibility point .every // Executed after every action and else handler with the new state as input .build;