Skip to main content

All Questions

Tagged with
-4 votes
0 answers
20 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
23 views

TypeError: Cannot read properties of undefined (reading 'numberOfCakes')

I am beginner to React and Redux I am trying to learn Redux with React. I have created a store in store.js as below - const redux = require("redux"); const createStore = redux.createStore; ...
codenostalgia's user avatar
-1 votes
0 answers
28 views

Why do all posts have one identical copy with identical data [closed]

I've recently been making blog pet project and encountered problem of posts having identical copies. Because of that when I try to add reactions to the post I keep getting next error It starts from 1 ...
zhans's user avatar
  • 1
1 vote
1 answer
27 views

'dispatch' is declared but its value is never read

'dispatch' is declared but its value is never read this is the code where I'm using this: actions/index.js import { auth, provider } from "../firebase"; export function SignInAPI() { ...
jaspreet's user avatar
0 votes
0 answers
96 views

Why elements from fetch + redux don't display all the time

I'm trying to display "tweets" using a local fetch and it almost works. It randomly doesn't display some message when posted. Then when posting a new one it posts two at the same time (with ...
david33's user avatar
  • 11
1 vote
2 answers
40 views

Unexpected Application Error, in using Redux and React, array

I want to show the data of customers from Redux and the data is successfully stored in Redux. I checked it with ReactDevTools the error is when I use useSelect to retrieve the data from the store. ...
Ainz's user avatar
  • 51
1 vote
2 answers
34 views

React Redux: TypeError: prepareAction is not a function

I am trying to store some data from an API into my Redux store but when I try to dispatch I get this error: TypeError: prepareAction is not a function Below is my code regarding the redux store: ...
RMP1992's user avatar
  • 73
1 vote
1 answer
22 views

I'm using Redux for data fetching and my extraReducers is not working cause I cant fetching data from products

I am using a free e-commerce API for data fetching and my getProducts action is working in products.jsx. When I console.log(response) this is working but I cant use useSelector for fetching data from ...
Berk Bıçakcı's user avatar
1 vote
1 answer
18 views

I'm having trouble accessing the files array in my React component named 'Files' after dispatching an action to add a file to the Redux store

I can not access a files array in a component named 'Files' Dispatching the Action: This function handles the change event when a file is selected. It extracts metadata from the file and dispatches an ...
Haris Sohail's user avatar
0 votes
0 answers
67 views

Redux state not updating during testing after MSW mock request

I'm adding integration tests to key components in my app and I'm having trouble getting things to work as expected between Jest, RTL, Redux (RTK) and MSW. I have set up my environment with the ...
jansyb04's user avatar
  • 161
0 votes
3 answers
50 views

Updating my redux store with data from an Api on the click of a button

I tried updating the redux store of my application using a button but each time the button is clicked and the data from the api is mapped through, it doesn't update the store with the value as ...
Fredrick Aniebonam's user avatar
3 votes
1 answer
51 views

Issue with state in Redux state always one step behind

I've written the logic for login functionality using Redux-Toolkit (RTK) and these are the components. In the login component, while calling on handle submit, I always get error to be empty the first ...
Saju's user avatar
  • 70
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

15 30 50 per page
1
2 3 4 5
758