-
-
Notifications
You must be signed in to change notification settings - Fork 265
Description
Property 'query','store','res' does not exist on type 'Store<any, AnyAction>'.
When i updated the next redux wrapper from version 6.0.2 to 8.0.1 it starts giving me error
Property query','store','res' does not exist on type 'Store<any, AnyAction>'.
- Here is screenshot
- This is my createStore file code:
import {
createStore,
applyMiddleware,
Store,
Middleware,
AnyAction,
} from 'redux';
import { createWrapper, HYDRATE } from 'next-redux-wrapper';
import thunk from 'redux-thunk';
import rootReducer, { AppState } from './index';
const bindMiddleware = (middleware: Middleware[]) => {
if (process.env.NODE_ENV !== 'production') {
const { composeWithDevTools } = require('redux-devtools-extension');
return composeWithDevTools(applyMiddleware(...middleware));
}
return applyMiddleware(...middleware);
};
export function configureStore(initialState = {}): Store {
const middleware = [thunk];
const store = createStore(
rootReducer,
initialState,
bindMiddleware(middleware)
);
return store;
}
const reducer = (state: AppState, action: AnyAction) => {
if (action.type === HYDRATE) {
return {
...state,
...action.payload,
};
}
return rootReducer(state, action);
};
const makeStore = () => createStore(reducer, {}, bindMiddleware([thunk]));
export const wrapper = createWrapper(makeStore, { debug: false });