@zaibot/fsa-saga
v0.1.2
Published
Easy type checked Flux Standard Action for TypeScript
Downloads
5
Readme
@zaibot/fsa-saga
Easy type checked Flux Standard Action for TypeScript
Installation
npm i -S @zaibot/fsa-saga
Usage
import { Action } from '@zaibot/fsa';
import { takeEvery } from '@zaibot/fsa-saga';
export const HELLO_WORLD = Action<{ message: string; }>('HELLO_WORLD');
function* rootSaga() {
yield takeEvery(HELLO_WORLD, (action) => {
console.log(action.payload.message);
});
}