Pls tell me what I did wrong? configureStore.js:
import {configureStore, combineReducers} from "@reduxjs/toolkit";
import pokemonSearchSlice from "./slices/pokemonSearch";
const reducer = combineReducers({
pokemonSearch: pokemonSearchSlice
});
const store = configureStore({
reducer
});
export default store;
pokemonSearch.js
import { createSlice } from "@reduxjs/toolkit";
const pokemonSearchSlice = createSlice({
name: "pokemonSearch",
initialState: {
searchInputValue: ""
},
reducers: {
setValue:(state, action)=>({...state, searchInputalue: action.payload})
}
}) ;
export const {setValue} = pokemonSearchSlice.actions;
export default pokemonSearchSlice;
Full text of error: redux.js:394 Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers. Also I'm not able to get that "searchInputValue" from the store, console says :Cannot destructure property 'searchInputValue' of '(0 , react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(...)' as it is undefined. But I think it's because of combineReducers error. Any suggestions?