Skip to content

speedtreammanga/redux-create-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A packaged version of redux makeActionCreator function for less boilerplate code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published