redux-namespace-actions
v1.0.1
Published
Add a namespace to redux actions in order to have leaner names.
Downloads
4
Readme
redux-namespace-actions
Add a namespace to redux actions in order to have leaner names.
how to install
$ npm install --save redux-namespace-actions
how to use it
The goal of this package is to allow shorter and leaner names for redux actions in different files.
// file a.js
import namespace from "redux-namespace-actions"
// or var namespace = require("redux-namespace-actions")
const action = namespace("FIRST_NAMESPACE")
const ACTION_TYPE = action("ACTION_TYPE")
Using a name space, you will be able to define scoped action type constants and use them accross your project.
// file b.js
import namespace from "redux-namespace-actions"
const action = namespace("SECOND_NAMESPACE")
const ACTION_TYPE = action("ACTION_TYPE")