0.1.0 • Published 6 years ago

redux-fast-actions v0.1.0

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

Build Status

Why?

Because declaring action constants and action creator function for each action is a real pain.

One object to rule them all

Create an action config object.

import fastActions from 'redux-fast-actions';

const = actions = {
  home: {
    fetchFeed: { payload: ['feeds'] },
  }
}

fastActions(actions);

Redux Fast Actions generates actions constants and action creators.

{
  types:{
    HOME_FETCH_FEED: 'HOME_FETCH_FEED'
  },
  actions: {
    home: {
      fetchFeed: (feeds) => {
        return { type: HOME_FETCH_FEED, payload: { feeds } }
      }
    }
  }
}

Installation

npm i redux-fast-actions --save

or if you prefer yarn:

yarn add redux-fast-actions
0.1.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago