Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const composeEnhancers =
- (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ &&
- (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
- serializeAction: true
- });
- const createStoreWithApi = (api: IApi, initialState?: {}) => {
- const middlewares = [
- thunkMiddleware.withExtraArgument({
- api
- })
- ];
- const enhancer = composeWithDevTools(applyMiddleware(...middlewares));
- return createStore(rootReducer, initialState!, enhancer);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement