Skip to content

Commit

Permalink
fix: shared
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham2811 committed Oct 10, 2024
1 parent ed9b9b7 commit 280c932
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/subapp-redux/src/shared.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { configureStore, combineReducers } from "@reduxjs/toolkit";

//
// - stores can be shared between subapps with reduxShareStore flag
// - if it's true, then a common global store is used
Expand Down Expand Up @@ -109,6 +110,7 @@ function createSharedStore(initialState, info, storeContainer) {
),
preloadedState: initialState,
enhancer: info.reduxEnhancer(),
middleware: info.middleware,
});
} else {
store = configureStore({
Expand All @@ -118,6 +120,7 @@ function createSharedStore(initialState, info, storeContainer) {
info.reduxReducers
),
preloadedState: initialState,
middleware: info.middleware,
});
}
store[originalReplaceReducerSym] = store.replaceReducer;
Expand Down Expand Up @@ -167,6 +170,7 @@ function createSharedStore(initialState, info, storeContainer) {
reducer,
preloadedState: initialState,
enhancer: info.reduxEnhancer(),
middleware: info.middleware,
});
}
return configureStore({ reducer, preloadedState: initialState });
Expand Down

0 comments on commit 280c932

Please sign in to comment.