Skip to content

fiberthrone/redux-actions-namespace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redux-actions-namespace

Syntax sugar for using namespaces with redux-actions.

Usage

import { createNamespace } from 'redux-actions-namespace';

const { createAction, createActions } = createNamespace('UI/DROPDOWN/');
const toggle = createActions('TOGGLE');
const { show, hide } = createActions('SHOW', 'HIDE');

The code above is equivalent for this:

import { createAction, createActions } from 'redux-actions';

const NS = 'UI/DROPDOWN/';
const toggle = createActions(`${NS}TOGGLE`);
const { show, hide } = createActions(`${NS}SHOW`, `${NS}HIDE`);

License

MIT.

About

Syntax sugar for using namespaces with redux-actions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published