@ruslanuz/redux-with-reset-action
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Redux with reset action

A HOF for Redux reducers. It helps to add an action for resetting the Redux store.

Installation and Setup

Installation

NPM

npm i @ruslanuz/redux-with-reset-action

Yarn

yarn add @ruslanuz/redux-with-reset-action

Usage

import { combineReducers } from 'redux';
import withResetAction from '@ruslanuz/redux-with-reset-action';

const LOGOUT = 'LOGOUT';

const rootReducer = combineReducers({
  // Your reducers
});

export default withResetAction(rootReducer, LOGOUT);
// Resets store after logout

Dependencies (0)

    Dev Dependencies (9)

    Package Sidebar

    Install

    npm i @ruslanuz/redux-with-reset-action

    Weekly Downloads

    15

    Version

    0.1.3

    License

    MIT

    Unpacked Size

    7.27 kB

    Total Files

    12

    Last publish

    Collaborators

    • ruslanuz