chore: middleware
This commit is contained in:
parent
207930d274
commit
bc2b50bc08
|
@ -8,7 +8,7 @@ import effectsMiddleware from './effects';
|
|||
import {storageSubscription} from './storage';
|
||||
|
||||
export default async function configureStore(latus, options = {}) {
|
||||
const {history} = options;
|
||||
const {history, middleware = []} = options;
|
||||
const reducers = await ensureUniqueReduction(latus, '@reddichat/state/reducers', options);
|
||||
const {defaultState} = latus.config['@reddichat/state/client'];
|
||||
const reducer = combineReducers(reducers);
|
||||
|
@ -20,6 +20,7 @@ export default async function configureStore(latus, options = {}) {
|
|||
...getDefaultMiddleware(),
|
||||
routerMiddleware(history),
|
||||
effectsMiddleware(latus),
|
||||
...middleware,
|
||||
],
|
||||
preloadedState: reducer(defaultState, {type: null}),
|
||||
reducer,
|
||||
|
|
Loading…
Reference in New Issue
Block a user