Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
Redux-Toolkit Store does not have a valid reducer

I'm using Redux-Toolkit for the first time, followed the Quick-start in their documentation and am met with this error

Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.

I logged the reducers and the store objects to console and found that the store object from configure store doesn't have a reducer property at all.

If any of you can help out, I'd really appreciate it.

P.S : I already looked at all the other stackoverflow question on this. Nothing is relevant.

Here's my code

  • store.js
import { configureStore } from "@reduxjs/toolkit";

// Redux Reducers
import { authSlice } from "./slices/authSlice";
import { projectSlice } from "./slices/projectSlice";

export const store = configureStore({
    reducer: {
        auth: authSlice.reducer,
        project: projectSlice.reducer,
    },
});

  • authSlice.js
import { createSlice } from "@reduxjs/toolkit";

export const authSlice = createSlice({
    name: "auth",
    initialState: {
        isUserLoggedIn: false,
        userDetails: {},
    },
    reducers: {
        login: (state) => {
            state.auth.isUserLoggedIn = true;
        },
        logout: (state) => {
            state.auth.isUserLoggedIn = false;
        },
        register: (state) => {
            state.auth.isUserLoggedIn = true;
        },
    },
});

export const { login, logout, register } = authSlice.actions;

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!