githubEdit

ecosystem

Redux LogoReduxarrow-up-right

Getting Startedarrow-up-rightTutorialarrow-up-rightAPIarrow-up-rightFAQarrow-up-rightBest Practicesarrow-up-rightGitHubarrow-up-rightNeed help?arrow-up-right

🌜

🌞

Search

Redux LogoReduxarrow-up-right

Ecosystem#

Redux is a tiny library, but its contracts and APIs are carefully chosen to spawn an ecosystem of tools and extensions, and the community has created a wide variety of helpful addons, libraries, and tools. You don't need to use any of these addons to use Redux, but they can help make it easier to implement features and solve problems in your application.

For an extensive catalog of libraries, addons, and tools related to Redux, check out the Redux Ecosystem Linksarrow-up-right list. Also, the React/Redux Linksarrow-up-right list contains tutorials and other useful resources for anyone learning React or Redux.

This page lists some of the Redux-related addons that the Redux maintainers have vetted personally, or that have shown widespread adoption in the community. Don't let this discourage you from trying the rest of them! The ecosystem is growing too fast, and we have a limited time to look at everything. Consider these the “staff picks”, and don't hesitate to submit a PR if you've built something wonderful with Redux.

Table of Contents#

Library Integration and Bindings#

reduxjs/react-reduxarrow-up-right The official React bindings for Redux, maintained by the Redux team

angular-redux/ng-reduxarrow-up-right Angular 1 bindings for Redux

ember-redux/ember-reduxarrow-up-right Ember bindings for Redux

glimmer-redux/glimmer-reduxarrow-up-right Redux bindings for Ember's Glimmer component engine

tur-nr/polymer-reduxarrow-up-right Redux bindings for Polymer

lastmjs/redux-store-elementarrow-up-right Redux bindings for custom elements

Reducers#

Reducer Combination#

ryo33/combineSectionReducersarrow-up-right An expanded version of combineReducers, which allows passing state as a third argument to all slice reducers.

KodersLab/topologically-combine-reducersarrow-up-right A combineReducers variation that allows defining cross-slice dependencies for ordering and data passing

var masterReducer = topologicallyCombineReducers(

{ auth, users, todos },

// define the dependency tree

{ auth: ['users'], todos: ['auth'] }

)

Copy

Reducer Composition#

acdlite/reduce-reducersarrow-up-right Provides sequential composition of reducers at the same level

const combinedReducer = combineReducers({ users, posts, comments })

const rootReducer = reduceReducers(combinedReducer, otherTopLevelFeatureReducer)

Copy

mhelmer/redux-xformsarrow-up-right A collection of composable reducer transformers

const createByFilter = (predicate, mapActionToKey) =>

compose(

withInitialState({}), // inject initial state as {}

withFilter(predicate), // let through if action has filterName

updateSlice(mapActionToKey), // update a single key in the state

isolateSlice(mapActionToKey) // run the reducer on a single state slice

)

Copy

adrienjt/redux-data-structuresarrow-up-right Reducer factory functions for common data structures: counters, maps, lists (queues, stacks), sets

const myCounter = counter({

incrementActionTypes: ['INCREMENT'],

decrementActionTypes: ['DECREMENT']

})

Copy

Higher-Order Reducers#

omnidan/redux-undoarrow-up-right Effortless undo/redo and action history for your reducers

omnidan/redux-ignorearrow-up-right Ignore redux actions by array or filter function

omnidan/redux-recyclearrow-up-right Reset the redux state on certain actions

ForbesLindesay/redux-optimistarrow-up-right A reducer enhancer to enable type-agnostic optimistic updates

Actions#

reduxactions/redux-actionsarrow-up-right Flux Standard Action utilities for Redux

const increment = createAction('INCREMENT')

const reducer = handleActions({ [increment]: (state, action) => state + 1 }, 0)

const store = createStore(reducer)

store.dispatch(increment())

Copy

BerkeleyTrue/redux-create-typesarrow-up-right Creates standard and async action types based on namespaces

export const types = createTypes(

['openModal', createAsyncTypes('fetch')],

'app'

)

// { openModal : "app.openModal", fetch : { start : "app.fetch.start", complete: 'app.fetch.complete' } }

Copy

maxhallinan/kreighterarrow-up-right Generates action creators based on types and expected fields

const formatTitle = (id, title) => ({

id,

title: toTitleCase(title)

})

const updateBazTitle = fromType('UPDATE_BAZ_TITLE', formatTitle)

updateBazTitle(1, 'foo bar baz')

// -> { type: 'UPDATE_BAZ_TITLE', id: 1, title: 'Foo Bar Baz', }

Copy

Utilities#

reduxjs/reselectarrow-up-right Creates composable memoized selector functions for efficiently deriving data from the store state

const taxSelector = createSelector(

[subtotalSelector, taxPercentSelector],

(subtotal, taxPercent) => subtotal * (taxPercent / 100)

)

Copy

paularmstrong/normalizrarrow-up-right Normalizes nested JSON according to a schema

const user = new schema.Entity('users')

const comment = new schema.Entity('comments', { commenter: user })

const article = new schema.Entity('articles', {

author: user,

comments: [comment]

})

const normalizedData = normalize(originalData, article)

Copy

planttheidea/selectoratorarrow-up-right Abstractions over Reselect for common selector use cases

const getBarBaz = createSelector(

['foo.bar', 'baz'],

(bar, baz) => `${bar} ${baz}`

)

getBarBaz({ foo: { bar: 'a' }, baz: 'b' }) // "a b"

Copy

Store#

Change Subscriptions#

jprichardson/redux-watcharrow-up-right Watch for state changes based on key paths or selectors

let w = watch(() => mySelector(store.getState()))

store.subscribe(

w((newVal, oldVal) => {

console.log(newval, oldVal)

})

)

Copy

ashaffer/redux-subscribearrow-up-right Centralized subscriptions to state changes based on paths

store.dispatch( subscribe("users.byId.abcd", "subscription1", () => {} );

Copy

Batching#

tappleby/redux-batched-subscribearrow-up-right Store enhancer that can debounce subscription notifications

const debounceNotify = _.debounce(notify => notify())

const store = createStore(

reducer,

initialState,

batchedSubscribe(debounceNotify)

)

Copy

manaflair/redux-batcharrow-up-right Store enhancer that allows dispatching arrays of actions

const store = createStore(reducer, reduxBatch)

store.dispatch([{ type: 'INCREMENT' }, { type: 'INCREMENT' }])

Copy

laysent/redux-batch-actions-enhancerarrow-up-right Store enhancer that accepts batched actions

const store = createStore(reducer, initialState, batch().enhancer)

store.dispatch(createAction({ type: 'INCREMENT' }, { type: 'INCREMENT' }))

Copy

tshelburne/redux-batched-actionsarrow-up-right Higher-order reducer that handles batched actions

const store = createStore(enableBatching(reducer), initialState)

store.dispatch(batchActions([{ type: 'INCREMENT' }, { type: 'INCREMENT' }]))

Copy

Persistence#

rt2zz/redux-persistarrow-up-right Persist and rehydrate a Redux store, with many extensible options

const store = createStore(reducer, autoRehydrate())

persistStore(store)

Copy

react-stack/redux-storagearrow-up-right Persistence layer for Redux with flexible backends

const reducer = storage.reducer(combineReducers(reducers))

const engine = createEngineLocalStorage('my-save-key')

const storageMiddleware = storage.createMiddleware(engine)

const store = createStore(reducer, applyMiddleware(storageMiddleware))

Copy

redux-offline/redux-offlinearrow-up-right Persistent store for Offline-First apps, with support for optimistic UIs

const store = createStore(reducer, offline(offlineConfig))

store.dispatch({

type: 'FOLLOW_USER_REQUEST',

meta: { offline: { effect: {}, commit: {}, rollback: {} } }

})

Copy

Immutable Data#

ImmerJS/immerarrow-up-right Immutable updates with normal mutative code, using Proxies

const nextState = produce(baseState, draftState => {

draftState.push({ todo: 'Tweet about it' })

draftState[1].done = true

})

Copy

Side Effects#

Widely Used#

gaearon/redux-thunkarrow-up-right Dispatch functions, which are called and given dispatch and getState as parameters. This acts as a loophole for AJAX calls and other async behavior.

Best for: getting started, simple async and complex synchronous logic.

function fetchData(someValue) {

return (dispatch, getState) => {

dispatch({type : "REQUEST_STARTED"});

myAjaxLib.post("/someEndpoint", {data : someValue})

.then(response => dispatch({type : "REQUEST_SUCCEEDED", payload : response})

.catch(error => dispatch({type : "REQUEST_FAILED", error : error});

};

}

function addTodosIfAllowed(todoText) {

return (dispatch, getState) => {

const state = getState();

if(state.todos.length < MAX_TODOS) {

dispatch({type : "ADD_TODO", text : todoText});

}

}

}

Copy

redux-saga/redux-sagaarrow-up-right Handle async logic using synchronous-looking generator functions. Sagas return descriptions of effects, which are executed by the saga middleware, and act like "background threads" for JS applications.

Best for: complex async logic, decoupled workflows

function* fetchData(action) {

const { someValue } = action

try {

const response = yield call(myAjaxLib.post, '/someEndpoint', {

data: someValue

})

yield put({ type: 'REQUEST_SUCCEEDED', payload: response })

} catch (error) {

yield put({ type: 'REQUEST_FAILED', error: error })

}

}

function* addTodosIfAllowed(action) {

const { todoText } = action

const todos = yield select(state => state.todos)

if (todos.length < MAX_TODOS) {

yield put({ type: 'ADD_TODO', text: todoText })

}

}

Copy

redux-observable/redux-observablearrow-up-right

Handle async logic using RxJS observable chains called "epics". Compose and cancel async actions to create side effects and more.

Best for: complex async logic, decoupled workflows

const loginRequestEpic = action$ =>

action$

.ofType(LOGIN_REQUEST)

.mergeMap(({ payload: { username, password } }) =>

Observable.from(postLogin(username, password))

.map(loginSuccess)

.catch(loginFailure)

)

const loginSuccessfulEpic = action$ =>

action$

.ofType(LOGIN_SUCCESS)

.delay(2000)

.mergeMap(({ payload: { msg } }) => showMessage(msg))

const rootEpic = combineEpics(loginRequestEpic, loginSuccessfulEpic)

Copy

redux-loop/redux-looparrow-up-right

A port of the Elm Architecture to Redux that allows you to sequence your effects naturally and purely by returning them from your reducers. Reducers now return both a state value and a side effect description.

Best for: trying to be as much like Elm as possible in Redux+JS

export const reducer = (state = {}, action) => {

switch (action.type) {

case ActionType.LOGIN_REQUEST:

const { username, password } = action.payload

return loop(

{ pending: true },

Effect.promise(loginPromise, username, password)

)

case ActionType.LOGIN_SUCCESS:

const { user, msg } = action.payload

return loop(

{ pending: false, user },

Effect.promise(delayMessagePromise, msg, 2000)

)

case ActionType.LOGIN_FAILURE:

return { pending: false, err: action.payload }

default:

return state

}

}

Copy

jeffbski/redux-logicarrow-up-right

Side effects lib built with observables, but allows use of callbacks, promises, async/await, or observables. Provides declarative processing of actions.

Best for: very decoupled async logic

const loginLogic = createLogic({

type: Actions.LOGIN_REQUEST,

process({ getState, action }, dispatch, done) {

const { username, password } = action.payload

postLogin(username, password)

.then(

({ user, msg }) => {

dispatch(loginSucceeded(user))

setTimeout(() => dispatch(showMessage(msg)), 2000)

},

err => dispatch(loginFailure(err))

)

.then(done)

}

})

Copy

Promises#

acdlite/redux-promisearrow-up-right Dispatch promises as action payloads, and have FSA-compliant actions dispatched as the promise resolves or rejects.

dispatch({ type: 'FETCH_DATA', payload: myAjaxLib.get('/data') })

// will dispatch either {type : "FETCH_DATA", payload : response} if resolved,

// or dispatch {type : "FETCH_DATA", payload : error, error : true} if rejected

Copy

lelandrichardson/redux-packarrow-up-right Sensible, declarative, convention-based promise handling that guides users in a good direction without exposing the full power of dispatch.

dispatch({type : "FETCH_DATA", payload : myAjaxLib.get("/data") });

// in a reducer:

case "FETCH_DATA": =

return handle(state, action, {

start: prevState => ({

...prevState,

isLoading: true,

fooError: null

}),

finish: prevState => ({ ...prevState, isLoading: false }),

failure: prevState => ({ ...prevState, fooError: payload }),

success: prevState => ({ ...prevState, foo: payload }),

});

Copy

Middleware#

Networks and Sockets#

svrcekmichal/redux-axios-middlewarearrow-up-right Fetches data with Axios and dispatches start/success/fail actions

export const loadCategories() => ({ type: 'LOAD', payload: { request : { url: '/categories'} } });

Copy

agraboso/redux-api-middlewarearrow-up-right Reads API call actions, fetches, and dispatches FSAs

const fetchUsers = () => ({

[CALL_API]: {

endpoint: 'http://www.example.com/api/users',

method: 'GET',

types: ['REQUEST', 'SUCCESS', 'FAILURE']

}

})

Copy

itaylor/redux-socket.ioarrow-up-right An opinionated connector between socket.io and redux.

const store = createStore(reducer, applyMiddleware(socketIoMiddleware))

store.dispatch({ type: 'server/hello', data: 'Hello!' })

Copy

tiberiuc/redux-react-firebasearrow-up-right Integration between Firebase, React, and Redux

Async Behavior#

rt2zz/redux-action-bufferarrow-up-right Buffers all actions into a queue until a breaker condition is met, at which point the queue is released

wyze/redux-debouncearrow-up-right FSA-compliant middleware for Redux to debounce actions.

mathieudutour/redux-queue-offlinearrow-up-right Queue actions when offline and dispatch them when getting back online.

Analytics#

rangle/redux-beaconarrow-up-right Integrates with any analytics services, can track while offline, and decouples analytics logic from app logic

markdalgleish/redux-analyticsarrow-up-right Watches for Flux Standard Actions with meta analytics values and processes them

Entities and Collections#

tommikaikkonen/redux-ormarrow-up-right A simple immutable ORM to manage relational data in your Redux store.

Versent/redux-crudarrow-up-right Convention-based actions and reducers for CRUD logic

kwelch/entities-reducerarrow-up-right A higher-order reducer that handles data from Normalizr

amplitude/redux-queryarrow-up-right Declare colocated data dependencies with your components, run queries when components mount, perform optimistic updates, and trigger server changes with Redux actions.

cantierecreativo/redux-beesarrow-up-right Declarative JSON-API interaction that normalizes data, with a React HOC that can run queries

GetAmbassador/redux-clerkarrow-up-right Async CRUD handling with normalization, optimistic updates, sync/async action creators, selectors, and an extendable reducer.

shoutem/redux-ioarrow-up-right JSON-API abstraction with async CRUD, normalization, optimistic updates, caching, data status, and error handling.

jmeas/redux-resourcearrow-up-right A tiny but powerful system for managing 'resources': data that is persisted to remote servers.

Component State and Encapsulation#

threepointone/redux-react-localarrow-up-right Local component state in Redux, with handling for component actions

@local({

ident: 'counter', initial: 0, reducer : (state, action) => action.me ? state + 1 : state }

})

class Counter extends React.Component {

Copy

epeli/lean-reduxarrow-up-right Makes component state in Redux as easy as setState

const DynamicCounters = connectLean(

scope: "dynamicCounters",

getInitialState() => ({counterCount : 1}),

addCounter, removeCounter

)(CounterList);

Copy

DataDog/redux-doghousearrow-up-right Aims to make reusable components easier to build with Redux by scoping actions and reducers to a particular instance of a component.

const scopeableActions = new ScopedActionFactory(actionCreators)

const actionCreatorsScopedToA = scopeableActions.scope('a')

actionCreatorsScopedToA.foo('bar') //{ type: SET_FOO, value: 'bar', scopeID: 'a' }

const boundScopeableActions = bindScopedActionFactories(

scopeableActions,

store.dispatch

)

const scopedReducers = scopeReducers(reducers)

Copy

Dev Tools#

Debuggers and Viewers#

reduxjs/redux-devtoolsarrow-up-right

Dan Abramov's original Redux DevTools implementation, built for in-app display of state and time-travel debugging

zalmoxisus/redux-devtools-extensionarrow-up-right

Mihail Diordiev's browser extension, which bundles multiple state monitor views and adds integration with the browser's own dev tools

infinitered/reactotronarrow-up-right

A cross-platform Electron app for inspecting React and React Native apps, including app state, API requests, perf, errors, sagas, and action dispatching.

DevTools Monitors#

Log Monitorarrow-up-right The default monitor for Redux DevTools with a tree view

Dock Monitorarrow-up-right A resizable and movable dock for Redux DevTools monitors

Slider Monitorarrow-up-right A custom monitor for Redux DevTools to replay recorded Redux actions

Diff Monitorarrow-up-right A monitor for Redux DevTools that diffs the Redux store mutations between actions

Filterable Log Monitorarrow-up-right Filterable tree view monitor for Redux DevTools

Filter Actionsarrow-up-right Redux DevTools composable monitor with the ability to filter actions

Logging#

evgenyrodionov/redux-loggerarrow-up-right Logging middleware that shows actions, states, and diffs

inakianduaga/redux-state-historyarrow-up-right Enhancer that provides time-travel and efficient action recording capabilities, including import/export of action logs and action playback.

joshwcomeau/redux-vcrarrow-up-right Record and replay user sessions in real-time

socialtables/redux-unhandled-actionarrow-up-right Warns about actions that produced no state changes in development

Mutation Detection#

leoasis/redux-immutable-state-invariantarrow-up-right Middleware that throws an error when you try to mutate your state either inside a dispatch or between dispatches.

flexport/mutation-sentinelarrow-up-right Helps you deeply detect mutations at runtime and enforce immutability in your codebase.

mmahalwy/redux-pure-connectarrow-up-right Check and log whether react-redux's connect method is passed mapState functions that create impure props.

Testing#

arnaudbenard/redux-mock-storearrow-up-right A mock store that saves dispatched actions in an array for assertions

Workable/redux-test-beltarrow-up-right Extends the store API to make it easier assert, isolate, and manipulate the store

conorhastings/redux-test-recorderarrow-up-right Middleware to automatically generate reducers tests based on actions in the app

wix/redux-testkitarrow-up-right Complete and opinionated testkit for testing Redux projects (reducers, selectors, actions, thunks)

jfairbank/redux-saga-test-planarrow-up-right Makes integration and unit testing of sagas a breeze

Routing#

supasate/connected-react-routerarrow-up-right Synchronize React Router 4 state with your Redux store.

faceyspacey/redux-first-routerarrow-up-right Seamless Redux-first routing. Think of your app in states, not routes, not components, while keeping the address bar in sync. Everything is state. Connect your components and just dispatch flux standard actions.

Forms#

erikras/redux-formarrow-up-right A full-featured library to enable a React HTML form to store its state in Redux.

davidkpiano/react-redux-formarrow-up-right React Redux Form is a collection of reducer creators and action creators that make implementing even the most complex and custom forms with React and Redux simple and performant.

Higher-Level Abstractions#

keajs/keaarrow-up-right An abstraction over Redux, Redux-Saga and Reselect. Provides a framework for your app’s actions, reducers, selectors and sagas. It empowers Redux, making it as simple to use as setState. It reduces boilerplate and redundancy, while retaining composability.

TheComfyChair/redux-sccarrow-up-right Takes a defined structure and uses 'behaviors' to create a set of actions, reducer responses and selectors.

Bloomca/redux-tilesarrow-up-right Provides minimal abstraction on top of Redux, to allow easy composability, easy async requests, and sane testability.

Community Conventions#

Flux Standard Actionarrow-up-right A human-friendly standard for Flux action objects

Canonical Reducer Compositionarrow-up-right An opinionated standard for nested reducer composition

Ducks: Redux Reducer Bundlesarrow-up-right A proposal for bundling reducers, action types and actions

Previous

« Learning Resources

Next

Examples »

Docs

Community

More

Redux LogoRedux Logoarrow-up-right

Copyright © 2015–2021 Dan Abramov and the Redux documentation authors.

Last updated