redux-create-action

1.0.0 • Public • Published

Redux Create Action

Packaged this bit of code

Usage:

import { createAction } from 'redux-create-action';

export const addTodo = createAction('ADD_TODO', 'id', 'text');
// returns { type: "ADD_TODO", id, text }
import { addTodo } from '...';

const mapDispatchToProps = dispatch => ({
  onAddTodo: (id, text) => dispatch(addTodo(id, text))
});

Readme

Keywords

Package Sidebar

Install

npm i redux-create-action

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.5 kB

Total Files

6

Last publish

Collaborators

  • speedtreammanga