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

280
Views
No puede llamar a store.getState() mientras el reductor se está ejecutando... (No se trata de la extensión redux-devtools)

LoginModal.jsx

 import ... const [burgerAnimation, setBurgerAnimation] = useState(false); const handleBurgerAnimation = () => { setBurgerAnimation(!burgerAnimation); };

UserSlice.js

 import { createSlice, createAsyncThunk } from "@reduxjs/toolkit"; import LoginService from "../../Services/Login.service"; export const userSubmit = createAsyncThunk("user/submit", async (params) => { try { const { submitFunc, submitForm, dispatch, closeModal, navigate, handleBurgerAnimation } = params; const { data } = await submitFunc(submitForm); dispatch(handleError(null)); // clear error message after closeModal(); navigate("/"); return {data, handleBurgerAnimation}; } catch (error) { const { dispatch } = params; const errorMessage = error.response.data.message; dispatch(handleError(errorMessage)); dispatch(handleStatus("idle")) } }); export const userLogout = createAsyncThunk(...); export const userRefreshAccessToken = createAsyncThunk(...); const initialState = { userData: {}, errorResponse: null, status: "idle", }; export const userSlice = createSlice({ name: "user", initialState, reducers: {...}, extraReducers: { [userSubmit.pending]: (state, action) => {...}, [userSubmit.fulfilled]: (state, action) => { const {data, handleBurgerAnimation} = action.payload; if (data) { state.status = "succeeded"; state.userData = data; localStorage.setItem("user", JSON.stringify(action.payload)); handleBurgerAnimation(); } }, [userSubmit.error]: (state, action) => {...}, [userRefreshAccessToken.fulfilled]: (state, action) => {...} }, }); export ...

Hola a todos. Intento cerrar el menú de la barra de navegación en la web móvil cuando el usuario inicia sesión, pero cuando intento hacerlo, aparece este error. Si no uso la función handleBurgerAnimation en [userSubmit.fulfilled] , no aparece este error. ¿Cuál es el motivo? ¿No puedo usar la función handleBurgerAnimation en extrareducer? Finalmente, le agradecería si pudiera dar su opinión sobre mi proyecto. Repositorio: https://github.com/UmutPalabiyik/mook

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!