A mock store for testing Redux async action creators and middleware.

Related tags

redux javascript test
Overview

redux-mock-store Circle CI

npm

A mock store for testing Redux async action creators and middleware. The mock store will create an array of dispatched actions which serve as an action log for tests.

Please note that this library is designed to test the action-related logic, not the reducer-related one. In other words, it does not update the Redux store. If you want a complex test combining actions and reducers together, take a look at other libraries (e.g., redux-actions-assertions). Refer to issue #71 for more details.

Install

npm install redux-mock-store --save-dev

Or

yarn add redux-mock-store --dev

Usage

Synchronous actions

The simplest usecase is for synchronous actions. In this example, we will test if the addTodo action returns the right payload. redux-mock-store saves all the dispatched actions inside the store instance. You can get all the actions by calling store.getActions(). Finally, you can use any assertion library to test the payload.

import configureStore from 'redux-mock-store' //ES6 modules
const { configureStore } = require('redux-mock-store') //CommonJS

const middlewares = []
const mockStore = configureStore(middlewares)

// You would import the action from your codebase in a real scenario
const addTodo = () => ({ type: 'ADD_TODO' })

it('should dispatch action', () => {

  // Initialize mockstore with empty state
  const initialState = {}
  const store = mockStore(initialState)

  // Dispatch the action
  store.dispatch(addTodo())

  // Test if your store dispatched the expected actions
  const actions = store.getActions()
  const expectedPayload = { type: 'ADD_TODO' }
  expect(actions).toEqual([expectedPayload])
})

Asynchronous actions

A common usecase for an asynchronous action is a HTTP request to a server. In order to test those types of actions, you will need to call store.getActions() at the end of the request.

import configureStore from 'redux-mock-store'
import thunk from 'redux-thunk'

const middlewares = [thunk] // add your middlewares like `redux-thunk`
const mockStore = configureStore(middlewares)

// You would import the action from your codebase in a real scenario
function success() {
  return {
    type: 'FETCH_DATA_SUCCESS'
  }
}

function fetchData () {
  return dispatch => {
    return fetch('/users.json') // Some async action with promise
      .then(() => dispatch(success()))
  };
}

it('should execute fetch data', () => {
  const store = mockStore({})

  // Return the promise
  return store.dispatch(fetchData())
    .then(() => {
      const actions = store.getActions()
      expect(actions[0]).toEqual(success())
    })
})

API

configureStore(middlewares?: Array) => mockStore: Function

Configure mock store by applying the middlewares.

mockStore(getState?: Object,Function) => store: Function

Returns an instance of the configured mock store. If you want to reset your store after every test, you should call this function.

store.dispatch(action) => action

Dispatches an action through the mock store. The action will be stored in an array inside the instance and executed.

store.getState() => state: Object

Returns the state of the mock store.

store.getActions() => actions: Array

Returns the actions of the mock store.

store.clearActions()

Clears the stored actions.

store.subscribe(callback: Function) => unsubscribe: Function

Subscribe to the store.

store.replaceReducer(nextReducer: Function)

Follows the Redux API.

Old version (< 1.x.x)

https://github.com/arnaudbenard/redux-mock-store/blob/v0.0.6/README.md

Versions

The following versions are exposed by redux-mock-store from the package.json:

  • main: commonJS Version
  • module/js:next: ES Module Version
  • browser : UMD version

License

The MIT License

Issues
  • Cannot import redux-mock-store with v1.5.0

    Cannot import redux-mock-store with v1.5.0

    Hello,

    I upgraded redux-mock-store from v1.4.0 to v1.5.0, and with the new version I get: TypeError: redux_mock_store_1.default is not a function

    No code change on my project except the upgrade to v1.5.0...

    Sample use in my project:

    import createMockStore from 'redux-mock-store';
    import thunk from 'redux-thunk';
    import ApiService from 'services/ApiService';
    
    const middlewares = [thunk.withExtraArgument({ apiService: ApiService })];
    const mockStore = createMockStore<any>(middlewares);
    
    opened by Guymestef 31
  • Making the library framework agnostic

    Making the library framework agnostic

    I have noticed that there are multiple bugs related to how testing frameworks handle errors. I have built this library for mocha but it looks like we need to make it work with Jasmine and tape. I would love to get a conversation started on how we can make the library support multiple frameworks.

    Do you have examples of framework agnostic testing libraries? Or Should we make forks for every testing framework?

    Related issues

    https://github.com/arnaudbenard/redux-mock-store/issues/12 https://github.com/arnaudbenard/redux-mock-store/issues/13 https://github.com/arnaudbenard/redux-mock-store/issues/16 https://github.com/arnaudbenard/redux-mock-store/issues/21

    cc/ @marr @jdmunro @HowardLoTW @dara76

    Test runner bug 
    opened by arnaudbenard 26
  • Mock Store State is not being updated

    Mock Store State is not being updated

    I'm having the same issue as #45. Maybe I'm not understanding this correctly, but does mock-store actually run the actions through the reducers anywhere? I'm not seeing how they're ever connected with a setup like this:

    import configureStore from 'redux-mock-store'
    import thunk from 'redux-thunk'
    const mockStore = configureStore([thunk])
    const store = mockStore({ ...state })
    console.log(store.getState()) // => { ...state }
    store.dispatch(someAction())
    console.log(store.getActions()) // => [ someAction() ] The action does show up here!
    console.log(store.getState()) // => { ...state } But this is the same unchanged state as above
    
    opened by adamyonk 18
  • testing redux-saga with redux-mock-store

    testing redux-saga with redux-mock-store

    I am trying to write a test using redux-saga and redux-mock-store:

    Below is my test:

        import { describe, before, after, it } from 'mocha';
        import { assert, expect } from 'chai';
    
        import configureMockStore from 'redux-mock-store';
    
        import { applyMiddleware, compose } from 'redux';
    
        import createSagaMiddleware from 'redux-saga';
    
        import fetch from 'isomorphic-fetch';
        import fetchMock from 'fetch-mock';
    
        import reducer from '../app/reducers';
    
        import * as actions from '../app/actions/winratio-actions';
    
        import rootSaga from '../app/sagas';
    
        const sagaMiddleware = createSagaMiddleware();
    
        const mockStore = configureMockStore(
          reducer,
          compose(
            applyMiddleware(sagaMiddleware)
          ));
    
    
        describe('fetch results', () => {
          after(() => {
            fetchMock.restore();
          });
    
          it("should call failure action", () => {
            fetchMock.mock('http://localhost:4040/api/results', 501);
    
            const store = mockStore({});
    
            store.runSaga = sagaMiddleware.run;
    
            store.runSaga(rootSaga);
    
            store.dispatch(actions.loadResultsPage());
    
            //expect(store).to.not.be.null;
          });
        });
    

    But I get the following error message:

    fetch results should call failure action:
         TypeError: middleware is not a function
          at node_modules/redux/lib/applyMiddleware.js:49:16
          at Array.map (native)
          at node_modules/redux/lib/applyMiddleware.js:48:27
          at mockStore (node_modules/redux-mock-store/lib/index.js:70:12)
          at Context.<anonymous> (results-test.js:36:19)
    

    The only examples I can find online use redux-thunk:

          const middlewares = [ thunk ];
          const mockStore = configureMockStore(middlewares);
    

    How do I configure the mock store to use redux-saga?

    opened by dagda1 17
  • How to update the store for the mock store?

    How to update the store for the mock store?

    I'm confused about how we update the store dynamically. I presume this doesn't actually call reducers seen as it's just a mock.

    See http://stackoverflow.com/questions/41642041/redux-how-to-update-the-store-in-unit-tests for more details.

    I have also tried using enzyme's setContext({ store: //newStore here }); but it doesn't update the store correctly.

    opened by MartinDawson 16
  • Testing nested promises

    Testing nested promises

    Hi, I'm wondering if it's possible to test nested promises: eg. response.json() - it's a promise which can be invoked after fetch promise, however if I create "then" method for "store.dispatch" the nested promise won't get executed, is it possible to wait until it's executed? Regards

    opened by gregdymek 13
  • Exported external package typings file 'redux-mock-store/index.d.ts' is not a module. Please contact the package author to update the package definition

    Exported external package typings file 'redux-mock-store/index.d.ts' is not a module. Please contact the package author to update the package definition

    I have downloaded redux-mock-store and it include a definition, when you attempt to use it provides the following error:

    Exported external package typings file 'C:/Test/node_modules/redux-mock-store/index.d.ts' is not a module. Please contact the package author to update the package definition

    We have implemented a manual typing for redux-mock-store, that worked fine for us:

    /// <reference path="../../typings/globals/redux/index.d.ts"/>
    
    declare module "redux-mock-store" {
        interface MockStore extends Redux.Store {
            getState(): any;
            getActions(): Array<any>;
            dispatch(action: any): any;
            clearActions(): void;
            subscribe(): any;
        }
    
        function configureStore(...args: any[]) : (...args: any[]) => MockStore;
        export = configureStore;
    }
    
    

    This index.d.ts is providing conflicts (even excluding node_modules folders), in our case we are manually deleting that file whenever we install the package.Could it be a good idea to remove the d.ts from redux-mock-store, review it and an updated on to the typings repository?

    opened by brauliodiez 13
  • Tests not failing when expectations are not met

    Tests not failing when expectations are not met

    If I set up a test that should fail because the dispatched actions do not meet the expectations, the test is in-fact passing which can be quite dangerous.

    This is using redux-mock-store 0.0.6 and Jest 0.8.2.

    I believe the problem lies here:

    } catch (e) {
      if (done) {
        done(e);
      }
      throw e;
    }
    

    I was able to cause the test to fail as expected by simply not calling done, e.g:

    } catch (e) {
      if (done) {
        //done(e);
      }
      throw e;
    }
    

    I'm not 100% sure if this is an issue with this library or one with Jest, therefore I have not put together a PR yet until the matter has been discussed.

    Test runner bug 
    opened by jdmunro 13
  • Breaking changes introduced in minor version

    Breaking changes introduced in minor version

    In [email protected], the schema of the export is like this:

    export = {
        default: function configureStore() { ... }
    }
    

    In [email protected], the schema of the export is like this:

    export = function configureStore() { ... }
    

    The change between versions 1.4.0 and 1.5.0 is a minor version change. Breaking changes should not have been introduced in this version.

    This package has almost 30k downloads per day, so to introduce breaking changes in a minor version has quite a large impact.

    The best plan of action would be to mark version 1.5.0 and 1.5.1 as deprecated with:

    npm deprecate [email protected] "breaking changes in minor version"
    npm deprecate [email protected] "breaking changes in minor version"
    

    and to republish the current version as 2.0.0.

    opened by Jameskmonger 12
  • Test passes even if not all expected actions are dispatched

    Test passes even if not all expected actions are dispatched

    I have the following set-up actions.js

    export function loadData() {
        return function (dispatch) {
            dispatch(transactions([876]));
        };
    }
    

    actions-test.js

      jest.dontMock('../actions');
      jest.dontMock('redux-mock-store');
      jest.dontMock('redux-thunk');
    
      const configureMockStore = require('redux-mock-store');
      const thunk = require('redux-thunk');
      const middlewares = [ thunk ];
      const mockStore = configureMockStore(middlewares);
    
    describe('actions', () => {    
      it('should load data', (done) => {
        const expectedActions = [
          { type: actions.TRANSACTIONS, transactions : [876] },
          //{ type: actions.DOES_NOT_EXIST, foo : [] },
          //{ type: actions.EXISTS, foo : [] }
        ];
    
        const store = mockStore({}, expectedActions, done);
        store.dispatch(actions.loadData());
      });
    });
    

    Running the above test passes as expected.

    The problem is if I uncomment

          //{ type: actions.DOES_NOT_EXIST, foo : [] },
          //{ type: actions.EXISTS, foo : [] }
    

    the test still passes even though now only one of the 3 expectedActions is dispatched.

    Is this a bug, or am I misunderstanding something?

    Test runner bug 
    opened by dara76 12
  • getActions method doesn't log correct actions

    getActions method doesn't log correct actions

    getActions method doesn't log correct actions or more than 3 actions.

    I am trying to test reducers where I am dispatching reducers constantly. But, getActions isn't logging actions more than three.

    Jest CLI
    
     [
          { type: 'events/onStart', payload: undefined },
          { type: 'events/onStart', payload: undefined },
          { type: 'events/onEnd', payload: undefined }
        ] actions
        
    
    reducer.spec.js
    
    it('create event data - on success', async () => {
        const expected = [
          onStart(),
          onSuccess(createEventResponsePayload),
          onEnd(),
        ];
        const callback = jest.fn();
        await dispatch(events.createEventData(createEventPayload, callback));
        
        console.log(actions, 'actions');
        
        // expect(actions[0]).toStrictEqual(expected[0]);
        // expect(actions[1]).toStrictEqual(expected[1]);
    
        expect(callback).toHaveBeenCalledTimes(1);
      });
    
    events.js
    
    const createEventData = (data, callback) => async (dispatch) => {
      try {
        dispatch(eventSlice.actions.onStart());
        const event = await createEvent(data);
        // Invoke callback with args to confirm request success
        if (callback) {
          callback(null, event.id);
        }
        dispatch(getOrganizerEventsData());
        dispatch(eventSlice.actions.onEnd());
        // Returning back data for chatroom
        return eventDataRegardingChatroom(event);
      } catch (err) {
        // Invoke callback with error arg to confirm request failed
        if (callback) {
          callback(err);
        }
        dispatch(eventSlice.actions.onError(err.toString()));
      }
    };
    
    const getOrganizerEventsData = () => async (dispatch) => {
      try {
        dispatch(eventSlice.actions.onStart());
        const events = await getOrganizerEvents();
        dispatch(eventSlice.actions.onSuccess(sortEventsWithDateTime(events)));
        dispatch(eventSlice.actions.onEnd());
      } catch (err) {
        dispatch(eventSlice.actions.onError(err.toString()));
      }
    };
    

    As you can see, it should log:

    onStart, onStart, onSuccess, onEnd, onEnd

    Am I correct?

    Why isn't loging in this order?

    opened by Ckbhatia 0
  • [Redux-toolkit] [createEntityAdapter] Cannot read property 'ids' of undefined

    [Redux-toolkit] [createEntityAdapter] Cannot read property 'ids' of undefined

    Hi, I got an error when running the test. Any help or suggestions for me?

    • redux-mock-store: ^1.5.4
    • "@types/redux-mock-store": "^1.0.2",
    • "@reduxjs/toolkit": "^1.3.5",
    • "@testing-library/react-native": "^5.0.3",

    Error when run testing

    TypeError: Cannot read property 'ids' of undefined

      47 |   const items = useSelector((state: MyState) => {
    > 48 |     return myEntityAdapter.getSelectors().selectAll(state.mystate)
            |                                         ^
      49 |   })
      50 | 
    

    My test:

    const { queryByTestId } = render(
          <Provider store={store}>
            <MenuProvider skipInstanceCheck={true}>
              <MyComponent />
            </MenuProvider>
          </Provider>
        )
    

    mySlice.ts

    ...
    export const myEntityAdapter = createEntityAdapter<Item>()
    ...
    
    opened by daminhtung 0
  • Version 1.5.4?

    Version 1.5.4?

    Dependabot just pushed a PR to our repo for version 1.5.4, which doesn't have an associated release, and there haven't been recent changes that I can see in the commit history. What is this release? It seems suspect...

    opened by tstirrat15 2
  • does not work with nested async thunks?

    does not work with nested async thunks?

    adapted from the async example in the README:

    import configureStore from "redux-mock-store";
    import thunk from "redux-thunk";
    
    const middlewares = [thunk]; // add your middlewares like `redux-thunk`
    const mockStore = configureStore(middlewares);
    
    // You would import the action from your codebase in a real scenario
    function success() {
      return {
        type: "FETCH_DATA_SUCCESS"
      };
    }
    
    function success_innerAsync() {
      return {
        type: "FETCH_DATA_SUCCESS--INNER_DISPATCH"
      };
    }
    
    function fetchData() {
      return async dispatch => {
        await fetch("/users.json"); // Some async action with promise
        dispatch(success());
        dispatch(fetchMoreData_innerAsync());
      };
    }
    
    function fetchMoreData_innerAsync() {
      return async dispatch => {
        await fetch("/more-data.json"); // Some async action with promise
        dispatch(success_innerAsync());
      };
    }
    
    it("should execute fetch data", () => {
      const store = mockStore({});
    
      // Return the promise
      return store.dispatch(fetchData()).then(() => {
        const actions = store.getActions();
        expect(actions).toEqual([success(), success_innerAsync()]);
      });
    });
    

    What I'm expecting here is that the thunk fetchData dispatches success() to the store and also dispatches the thunk fetchMoreData_innerAsync; this second thunk should dispatch success_innerAsync() to the store. So i would expect e.g.:

    expect(store.getActions()).toEqual([success(), success_innerAsync()]);

    But instead, the result is:

    Expected value to equal:
      [{"type": "FETCH_DATA_SUCCESS"}, {"type": "FETCH_DATA_SUCCESS--INNER_DISPATCH"}]
    Received:
      [{"type": "FETCH_DATA_SUCCESS"}]
    
    Difference:
    
    - Expected
    + Received
    
    Array [
        Object {
          "type": "FETCH_DATA_SUCCESS",
        },
    -   Object {
    -     "type": "FETCH_DATA_SUCCESS--INNER_DISPATCH",
    -   },
      ]
    

    Here's a code sandbox demonstrating:

    https://codesandbox.io/s/fragrant-smoke-e0egv?file=/src/index.test.js

    This is just a minimal example for to demonstrate, this kind of usage of async thunks in real code seems to work fine in my application. Hence, I don't think I'm abusing Redux/thunks somehow (though please let me know if i am!), but rather that I'm either not understanding how to properly use the mock store, or that there's a bug that only captures the top level of async thunks.

    (Or perhaps this will turn out to be a feature request for some kind of new API that expands on .getActions to await all nested async actions/thunks somehow...)

    Thanks for any advice!

    opened by bcolloran 2
  • The Documentation is wrong for CommonJS

    The Documentation is wrong for CommonJS

    Hi, For CommonJS version you need to put:

    const configureStore = require('redux-mock-store').default;

    instead of const { configureStore } = require('redux-mock-store'), also this: const configureStore = require('redux-mock-store') doesn't work. the problem is related with the double export statement that you make: export function configureStore ... export default configureStore Regarding of that, it's a great tool for testing!

    opened by Frankeo 1
  • Issue with Store Helpers

    Issue with Store Helpers

    I have a scenario in which a method uses Store Helper to get State. When I try to test the function using the mock store which I have created, it uses the original store instance ( since it is in a helper file).

    code.js

    export const testFunction() {
    const res = getValueFromHelper();
    console.log(res);
    }
    

    helper.js

    export const getValueFromHelper = () => store.getState.SomeReducer;
    

    code.test.js

    const store = mockStore({ SomeReducer:{} })
    console.log(store.getState().SomeReducer);  // Here value is correct
    testFunction(); // But here it returning original state value
    
    
    opened by satheshrgs 1
  • refactor(lib): remove lodash

    refactor(lib): remove lodash

    This PR removes the lodash dependency and replaces the used function with plain javascript.

    opened by danielsogl 3
  • Test with extra dispatched action in middleware

    Test with extra dispatched action in middleware

    Hi coders! I would like to test my middleware and in my case I use it to check if an input field value has correct pattern to display an error in case of not.

    My ValidationMiddleware.js:

    import { FORM_SET_VALUE, FORM_SET_ERROR } from '../../../lib/components/containers/form/store/constants';
    
    const validationMiddleware = store => next => action => {
    	if (action.type !== FORM_SET_VALUE) {
    		return next(action);
    	}
    	const { pattern, value, attr } = action;
    	const state = store.getState();
    	const newError = new RegExp(pattern).exec(value) === null;
    	const oldError = state.form.form[attr] ? state.form.form[attr].error : false;
    	if (newError !== oldError) {
    		store.dispatch({
    			type: FORM_SET_ERROR,
    			error: newError,
    			attr,
    		});
    	}
    	next(action);
    };
    
    export default validationMiddleware; 
    

    And my ValidationMiddleware.text.js:

    const configureMockStore = require('redux-mock-store').default;
    import validationMiddleware from './validationMiddleware';
    import { FORM_SET_ERROR } from '../../../lib/components/containers/form/store/constants';
    import { setFormValue } from '../../../lib/components/containers/form/store/actions';
    
    const mockStore = configureMockStore([validationMiddleware]);
    
    describe('Validation middleware', () => {
    	it('should dispatch error when wrong value for specific pattern', () => {
    
    		const store = mockStore({
    			form: {
    				form: {
    					field: {
    						error: false,
    					},
    				},
    			},
    		});
    		store.dispatch(setFormValue('field', '123', '^[a-zA-Z\-\'. ]*$'));
    		const expectedPayload = {
    			type: FORM_SET_ERROR,
    			attr: 'field',
    			error: true,
    		};
    		const actions = store.getActions();
    		expect(actions).toEqual([expectedPayload]);
    	});
    });
    

    The point is that it dispatches another action in case of error so there are two different actions dispatched instead of one (FORM_SET_ERROR and FORM_SET_VALUE).

    So I don't know how to check if the FORM_SET_ERROR was dispatched. Any ideas?

    Thank you in advance!

    opened by Cicko 0
  • Cannot read property 'enqueueForceUpdate' of undefined

    Cannot read property 'enqueueForceUpdate' of undefined

    dispatching a call after a component unmounts, using mock-store and getting a Cannot read property 'enqueueForceUpdate' of undefined

    opened by george-norris-salesforce 0
  • Configuring store for all React tests

    Configuring store for all React tests

    I want to know if there is a way to configure jest and enzyme tests to contain a react store? I'm aware that there is a way to configure a store for an individual react component when it is connected with redux. I have a helper method which returns an array of react components which are untested. So instead of testing all 20 react components, I think configuring a mock store should solve it. This is my error:

    FAIL  src/core/factory/__tests__/searchFactory.test.js
      ● Test suite failed to run
    
        TypeError: Cannot read property 'reducers' of undefined
    
          26 | const oidcMiddleware = createOidcMiddleware(mgr, true, false, API_LOGIN_CALLBACK, null);
          27 | 
        > 28 | const store = init({
             |               ^
          29 |   models,
          30 |   plugins: [selectorsPlugin()],
          31 |   redux: {
    
    opened by maksimgm 1
Releases(v1.5.3)
Owner
Redux
Redux is a predictable state container for JavaScript apps.
Redux
A mock store for testing Redux async action creators and middleware.

redux-mock-store A mock store for testing Redux async action creators and middleware. The mock store will create an array of dispatched actions which

Redux 2.4k Oct 11, 2021
Thunk middleware for Redux

Redux Thunk Thunk middleware for Redux. npm install redux-thunk yarn add redux-thunk Note on 2.x Update Most tutorials today assume that you're using

Redux 16.7k Oct 13, 2021
Ruthlessly simple bindings to keep react-router and redux in sync

Project Deprecated This project is no longer maintained. For your Redux <-> Router syncing needs with React Router 4+, please see one of these librari

React Community 7.9k Oct 14, 2021
:recycle: higher order reducer to add undo/redo functionality to redux state containers

redux undo/redo simple undo/redo functionality for redux state containers Protip: Check out the todos-with-undo example or the redux-undo-boilerplate

Daniel Bugl 2.7k Oct 15, 2021
Logger for Redux

Logger for Redux Now maintained by LogRocket! LogRocket is a production Redux logging tool that lets you replay problems as if they happened in your o

null 5.6k Oct 13, 2021
persist and rehydrate a redux store

Redux Persist Persist and rehydrate a redux store. v6 upgrade Web: no breaking changes React Native: Users must now explicitly pass their storage engi

Zack Story 11.6k Oct 12, 2021
A Higher Order Component using react-redux to keep form state in a Redux store

redux-form You build great forms, but do you know HOW users use your forms? Find out with Form Nerd! Professional analytics from the creator of Redux

Redux Form 12.6k Oct 16, 2021
Redux DevTools remotely.

Remote Redux DevTools Use Redux DevTools remotely for React Native, hybrid, desktop and server side Redux apps. Installation npm install --save-dev re

Mihail Diordiev 1.8k Oct 14, 2021
Notas de estudo sobre o workflow de implementação do React Redux Toolkit.

Resumo: Redux Toolkit Este projeto foi criado com Create React App, usando o Redux e Redux Toolkit como modelos. Documentação: https://redux-toolkit.j

Thomas Ferreira 6 Oct 12, 2021
Redux bindings for client-side search

redux-search Higher-order Redux library for searching collections of objects. Search algorithms powered by js-worker-search. Check out the live demo a

Brian Vaughn 1.4k Oct 7, 2021
RxJS middleware for action side effects in Redux using "Epics"

RxJS-based middleware for Redux. Compose and cancel async actions to create side effects and more. https://redux-observable.js.org Install This has pe

redux-observable 7.7k Oct 20, 2021
Selector library for Redux

Reselect Simple “selector” library for Redux (and others) inspired by getters in NuclearJS, subscriptions in re-frame and this proposal from speedskat

Redux 18.2k Oct 17, 2021
Declarative Side Effects for Redux

Redux Data FX Declarative Side Effects for Redux. It helps you keep your business logic and effectful code separate. The idea is simple: in addition o

Matthieu Béteille 53 Jun 30, 2021
Analytics middleware for Redux

redux-analytics Analytics middleware for Redux. $ npm install --save redux-analytics Want to customise your metadata further? Check out redux-tap. Usa

Mark Dalgleish 490 Aug 17, 2021
redux-immutable is used to create an equivalent function of Redux combineReducers that works with Immutable.js state.

redux-immutable redux-immutable is used to create an equivalent function of Redux combineReducers that works with Immutable.js state. When Redux creat

Gajus Kuizinas 1.9k Oct 11, 2021
The official, opinionated, batteries-included toolset for efficient Redux development

Redux Toolkit The official, opinionated, batteries-included toolset for efficient Redux development (Formerly known as "Redux Starter Kit") Installati

Redux 6.5k Oct 13, 2021
Official React bindings for Redux

React Redux Official React bindings for Redux. Performant and flexible. Installation Using Create React App The recommended way to start new apps with

Redux 21.5k Oct 15, 2021
An i18n solution for React/Redux and React Native projects

redux-react-i18n An i18n solution with plural forms support for Redux/React Workers of all countries, unite! Supported languages list with expected co

Dmitry Erzunov 63 Sep 30, 2021
Redux-Toolkit example with React Hooks CRUD Application, Axios, Rest API, Bootstrap

Redux-Toolkit example with React Hooks CRUD Application, Axios, Rest API, Bootstrap

null 7 Oct 11, 2021