applyMiddleware(...middleware)

A replacement for Redux's applyMiddleware store enhancer that applies the middleware to the store and subspaces created from it. It also supports Redux Subspace specific middleware.

Arguments

  1. ...middleware (arguments): Functions that conform to the Redux middleware API or Redux Subspaces middleware API.

Returns

(Function): A store enhancer that applies the given middleware.

Examples

import { createStore } from 'redux'
import { applyMiddleware } from 'redux-subspace'
import { reducer, middleware } from 'somewhere'

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

results matching ""

    No results matching ""