redux-actions-namespace

1.0.1 • Public • Published

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.

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i redux-actions-namespace

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • fiberthrone