Skip to content

MrRacoon/reducker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reducker

Build Status

Utility functions for channeling your inner duck and reducing redux boilerplate.

Install

npm i --save reducker

Usage

If you use duck-typing in redux, you'll quickly start to notice that many action creators are just the same trivial boilerplate repeated over and over again. We can reduce this boilerplate by encapsulating the common code.

const ADD_TODO = 'APP/TODO/ADD'
const addTodo = payload => ({ type: ADD_TODO, payload })

now becomes:

import { payload } from 'reducker';

const ADD_TODO = 'APP/TODO/ADD'
const addTodo = payload(ADD_TODO);

Documentation

You can find documentation for each function here

About

Utilities for minimizing redux boilerplate

Resources

Stars

Watchers

Forks

Packages

No packages published