An open API service indexing awesome lists of open source software.

https://github.com/webpatch/redux-go

redux helpers
https://github.com/webpatch/redux-go

redux redux-helpers

Last synced: 3 months ago
JSON representation

redux helpers

Awesome Lists containing this project

README

          

# Redux-go

Some redux helpers.

## Usage

```js

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'))

```