reducker

1.0.3 • Public • Published

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.

import { actions } from 'reducker';

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

now becomes:

import { actions } from 'reducker';

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

Documentation

You can find documentation for each function here

Readme

Keywords

none

Package Sidebar

Install

npm i reducker

Weekly Downloads

4

Version

1.0.3

License

ISC

Last publish

Collaborators

  • mrracoon