1.0.4 • Published 4 years ago

redux-go v1.0.4

Weekly downloads
4
License
ISC
Repository
github
Last release
4 years ago

Redux-go

Some redux helpers.

Usage

import { createAction, createReducer } from 'redux-go';

// define action
const changeData = createAction('changeData');

// define init state
const appState = { name: '' };

// define reducer 
const reducer = createReducer({
    [changeData]: (state, action) => {
        return {...state, name: action.payload};
    },
}, appState);

// dispatch action
dispatch(changeData('tom'))
1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago