From 17e3134cfcfcc04fb0be29a67f012bd98692ddfe Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Thu, 30 Nov 2023 23:04:06 +0100 Subject: [PATCH] don't update to redux toolkit in this PR --- examples/custom-map-style/src/store.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/examples/custom-map-style/src/store.ts b/examples/custom-map-style/src/store.ts index 8826752c05..bcaa18b64d 100644 --- a/examples/custom-map-style/src/store.ts +++ b/examples/custom-map-style/src/store.ts @@ -18,10 +18,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -import {combineReducers, applyMiddleware} from 'redux'; +import {createStore, combineReducers, applyMiddleware, compose} from 'redux'; import keplerGlReducer, {enhanceReduxMiddleware} from '@kepler.gl/reducers'; -import { configureStore } from '@reduxjs/toolkit'; -import { StoreEnhancer } from 'redux'; const mapStyles = { voyager: { @@ -66,16 +64,11 @@ const customizedKeplerGlReducer = keplerGlReducer.initialState({ } }); +const reducers = combineReducers({ + keplerGl: customizedKeplerGlReducer +}); const middlewares = enhanceReduxMiddleware([]); -const enhancers: StoreEnhancer[] = [applyMiddleware(...middlewares)]; - - -const store = configureStore({ - reducer: { - keplerGl: customizedKeplerGlReducer - }, - enhancers: enhancers -}); +const enhancers = [applyMiddleware(...middlewares)]; -export default store; +export default createStore(reducers, {}, compose(...enhancers));