Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

190
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda