hiteshchoudhary / chai-aur-react

chai aur react series on youtube
6.6k stars 854 forks source link

useReducer is not working in reduxToolkitTodo #19

Open Shanmukha1217 opened 10 months ago

Shanmukha1217 commented 10 months ago

import { configureStore } from "@reduxjs/toolkit"; import { todoSlice } from "../features/todo/todoSlice"; //Change the import

export const store = configureStore({ reducer: todoSlice.reducer, // Use todoSlice.reducer as the reducer });

DRP07 commented 10 months ago

try

import {configureStore} from '@reduxjs/toolkit'; import todoReducer from '../features/todo/todoSlice'; export const store= configureStore({ reducer:todoReducer })

problem is basically with curly brackets, remove them and it will work perfectly

sameekshaagupta commented 1 month ago

export const store = configureStore({ reducer: todoReducer }) use this