Skip to main content

All Questions

Tagged with
-4 votes
0 answers
21 views

Invariant failed: A state mutation was detected between dispatches [closed]

This is the body of the code const tableHeader = [ { title: "Product name", widthClass: "w-[25%]" }, { title: "Product category", widthClass: "w-[19%...
Iroh Nkechi Omolola's user avatar
-1 votes
0 answers
21 views

Redux State Does Not Change When Modified From useInterval

so im trying to load user data from localStorage and set it to the redux user state. heres what i have done: Where The User Is Being Used: import Fruit from "../components/Fruit" import { ...
AmirparsaDD's user avatar
0 votes
1 answer
44 views

Why is my `amount` reading as undefined from my `createSlice`?

I have just started learning Redux with React so I apologize if it is something as simple as syntax. This project prompts me to use a variety of react-redux functions. I have my slice below: /** @type ...
antjuh's user avatar
  • 59
1 vote
2 answers
48 views

How is my useDispatch hook set up incorrectly here?

I have just started learning Redux with React so I apologize if it is something as simple as syntax. This project prompts me to use a variety of react-redux functions. I have my slice below: /** @type ...
antjuh's user avatar
  • 59
0 votes
0 answers
53 views

React useCallback not working as expected in chatapp

Am making a chat app. Am using socket.io, redux-toolkit and rtk-query . When I open a chat I get chatId in params. and I sent the message (new message using socket.io) with the id. The problem I'm ...
Sayedul Karim's user avatar
1 vote
1 answer
26 views

Search Reducer, searched items removed from redux store

import { createSlice } from "@reduxjs/toolkit"; export const productSlice = createSlice({ name: 'products', initialState: [], reducers: { addProduct: (state, action) => { ...
Prajwal VK's user avatar
1 vote
1 answer
129 views

In React/Next.js after click link data will not updated

In Next.js when clicking Link the new page url will open "/component/product", but according to product data will not updated in redux store where I used. It have to refresh page to update ...
Apurv's user avatar
  • 105
1 vote
2 answers
57 views

Making it safe to call a hook from outside of the Redux Provider, when it access the Redux store?

I have a hook useGetFooId that attempts to get a Foo ID from the Redux store with fallback logic: If the Foo ID is set in the Redux store, it returns the ID from there (but it's expected that in some ...
Alex von Brandenfels's user avatar
-1 votes
2 answers
41 views

How can I implement the inputSearch component so that users can find a certain task by typing a couple of letters? [duplicate]

For now, I have almost finished implementing the functionality for users to find a certain task. I am using a variable called isTaskListEmpty to render different content depending on its state. But ...
Oleg's user avatar
  • 41
2 votes
4 answers
137 views

Too many re renders - React - Filter Data

const MyComponent = () => { const [avaliador, setAvaliador] = useState(""); const [avaliadoresList, setAvaliadoresList] = useState([]); const [DataResultsTotal, setDataResultsTotal] ...
lucas barbosa's user avatar
1 vote
1 answer
42 views

how to get updated state inside useIdleTimer.onIdle callback?

Have this pretty simple logic where if there is a logged in user and he has been idle for a certain amount of time he should be shown an inactivity modal const { user } = useTypedSelector((state) =>...
nikulas13's user avatar
  • 177
1 vote
1 answer
140 views

How can i filter values from the data coming from api call in react-redux

I am using react and redux to fetch data from an API call and now I have created a new variable and assigned it the same data. In the code, I am going to manipulate this new variable called ...
kheman garg's user avatar
0 votes
1 answer
45 views

React Redux Issue: Modal Opens with Empty Data Instead of Existing Record for Editing

I’m working on a React project with Redux for state management. I’m encountering an issue where, when I try to edit an existing record, the modal supposed to open with the filled data is opening with ...
felps's user avatar
  • 5
0 votes
1 answer
33 views

Looses focus after write one word in input when use UseSelctor. why?

Here is parent and child. i use UseSelector to get state and pass it child component. But when i write something in input it looses the focus. why? enter image description here enter image description ...
Ashish Pundir's user avatar
-1 votes
1 answer
93 views

React Hook "useSelector" used in common functions throws an error

This is my selectors.js import { useSelector } from 'react-redux'; export const useCloseAlertTrigger = () => useSelector((state) => state.common.closeAlertTrigger || {}); this is my ...
Robert Clave's user avatar

15 30 50 per page
1
2 3 4 5
73