Error in Browser console
Getting this error. Application runs fine but my redux store is not working.
Store.js
import { configureStore } from "@reduxjs/toolkit";
import merchantSlice from "./redux-slices/merchantSlice";
const store = configureStore({
reducer: {
merchant: merchantSlice.reducer,
}
})
export default store;
merchantSlice.js
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
merchant: "abcd",
token: null,
}
const merchantSlice = createSlice({
name: "merchant",
initialState: initialState,
reducers: {
setMerchant(state, action){
state.merchant = action.payload;
},
setToken(state, action){
state.token = action.payload;
},
logOutMerchant(state){
state.merchant = null;
state.token = null;
},
}
})
export const { setMerchant, setToken, logOutMerchant } = merchantSlice.actions;
export default merchantSlice.reducer;
I am trying to create the redux store for my application.