Skip to content

0xc14m1z/redux-namespace-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redux-namespace-actions

Build Status Coverage Status Maintainability

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")

About

Add a namespace to redux actions in order to have leaner names.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published