You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
2.6 KiB

{"ast":null,"code":"import { createStore, applyMiddleware, combineReducers } from \"redux\";\nimport { composeWithDevTools } from \"redux-devtools-extension\";\nimport { persistStore, persistReducer } from \"redux-persist\"; // import * as reducers from \"./reducers\";\n\nimport thunk from \"redux-thunk\";\nimport storage from \"redux-persist/lib/storage\"; // defaults to localStorage for web\n\nconst persistConfig = {\n key: \"root\",\n storage\n};\nconst initialState = {};\nconst middleware = [thunk];\nconst persistedReducer = persistReducer(persistConfig, combineReducers(reducers));\nexport default (() => {\n let store = createStore(persistedReducer, initialState, composeWithDevTools(applyMiddleware(...middleware)));\n const persistor = persistStore(store);\n return {\n store,\n persistor\n };\n});","map":{"version":3,"names":["createStore","applyMiddleware","combineReducers","composeWithDevTools","persistStore","persistReducer","thunk","storage","persistConfig","key","initialState","middleware","persistedReducer","reducers","store","persistor"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/redux/store.js"],"sourcesContent":["import { createStore, applyMiddleware, combineReducers } from \"redux\";\nimport { composeWithDevTools } from \"redux-devtools-extension\";\nimport { persistStore, persistReducer } from \"redux-persist\";\n\n// import * as reducers from \"./reducers\";\nimport thunk from \"redux-thunk\";\nimport storage from \"redux-persist/lib/storage\"; // defaults to localStorage for web\n\nconst persistConfig = {\n key: \"root\",\n storage,\n};\n\nconst initialState = {};\nconst middleware = [thunk];\n\nconst persistedReducer = persistReducer(\n persistConfig,\n combineReducers(reducers)\n);\n\nexport default () => {\n let store = createStore(\n persistedReducer,\n initialState,\n composeWithDevTools(applyMiddleware(...middleware))\n );\n const persistor = persistStore(store);\n\n return { store, persistor };\n};\n"],"mappings":"AAAA,SAASA,WAAT,EAAsBC,eAAtB,EAAuCC,eAAvC,QAA8D,OAA9D;AACA,SAASC,mBAAT,QAAoC,0BAApC;AACA,SAASC,YAAT,EAAuBC,cAAvB,QAA6C,eAA7C,C,CAEA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,OAAP,MAAoB,2BAApB,C,CAAiD;;AAEjD,MAAMC,aAAa,GAAG;EACpBC,GAAG,EAAE,MADe;EAEpBF;AAFoB,CAAtB;AAKA,MAAMG,YAAY,GAAG,EAArB;AACA,MAAMC,UAAU,GAAG,CAACL,KAAD,CAAnB;AAEA,MAAMM,gBAAgB,GAAGP,cAAc,CACrCG,aADqC,EAErCN,eAAe,CAACW,QAAD,CAFsB,CAAvC;AAKA,gBAAe,MAAM;EACnB,IAAIC,KAAK,GAAGd,WAAW,CACrBY,gBADqB,EAErBF,YAFqB,EAGrBP,mBAAmB,CAACF,eAAe,CAAC,GAAGU,UAAJ,CAAhB,CAHE,CAAvB;EAKA,MAAMI,SAAS,GAAGX,YAAY,CAACU,KAAD,CAA9B;EAEA,OAAO;IAAEA,KAAF;IAASC;EAAT,CAAP;AACD,CATD"},"metadata":{},"sourceType":"module"}