You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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';
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>'.
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 });
The text was updated successfully, but these errors were encountered: