redux-fast-actions

0.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i redux-fast-actions

Weekly Downloads

0

Version

0.1.0

License

ISC

Last publish

Collaborators

  • ozankasikci