0.1.2 • Published 7 years ago

@zaibot/fsa-saga v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

@zaibot/fsa-saga Coverage Status Build Status

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);
    });
}