Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [react-redux]

The react-redux package provides the official React bindings for Redux: the `useSelector` and `useDispatch` hooks and the `connect` higher-order component. Use this tag for questions about accessing and updating Redux state in React components.

react-redux
0 votes
0 answers
13 views

My profile page only rerender when rebuilt

import React, {useState, useEffect} from 'react'; import {useSelector, useDispatch} from 'react-redux'; import { View, Text, ImageBackground, TextInput, TouchableOpacity, StyleSheet, ...
Nguyen Pham's user avatar
1 vote
0 answers
11 views

Warning while testing React frontend: Unknown event handler property `onClonse`

I am repeatedly running into this warning while testing, and there are extremely few search results for "onClonse". My stack is: React + Vite Vitest + React Testing Library MSWv2 Material UI ...
Nicholas Kolatsis's user avatar
0 votes
0 answers
24 views

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

Ecommerce site using MERN. This is the Navbar.jsx component. Error shows cant read undefined 'quantity' on line 72. ERROR MESSAGE Uncaught TypeError: Cannot read properties of undefined (reading '...
Mamik Saha's user avatar
0 votes
0 answers
37 views

How to create video feed like Tik Tok?

How do I make the video start playing itself when the video is swiped? When the user just opens the feed feed so that the video starts playing immediately, when there is a swipe to another video, then ...
Ratibor's user avatar
  • 11
-1 votes
1 answer
13 views

React Component Redirects to /signin before accessToken updates [duplicate]

I'm working on a React application where I need to ensure that users are authenticated before they can access certain routes. I have a RequireAuthN component that is supposed to redirect ...
Anurag Joshi's user avatar
0 votes
0 answers
15 views

onClick event not being handled/fired while testing - Custom component with Lit Element using React Wrapper

I have this below component that is a Header Component with an AccessBar and an Icon Component with certain props. All the custom components are actually Lit Element components (uses shadowDOM) from a ...
user26512063's user avatar
-1 votes
2 answers
27 views

Assign selector value to state and not mutate original selector value when state is changed

I currently have a component that uses a selector with useSelector from react-redux. However, after I set the state with the selector value and then update the state with a onChange event handler, ...
henhen's user avatar
  • 1,151
1 vote
1 answer
30 views

How do I get my button to conditionally render Add to cart state and the quantity state?

I have been attempting creating a shopping cart with product list from https://www.frontendmentor.io/challenges/product-list-with-cart-5MmqLVAp_d I am currently trying to use redux as I would like to ...
ChrisKola99's user avatar
-2 votes
0 answers
15 views

Optimize Redux Data Updates

I am building a chat app with React/Redux. I want to store the messages state using Redux, it currently works with this code: // chatsReducer.js import { GET_CHATS_PENDING, GET_CHATS_SUCCESS, ...
Adrian John's user avatar
0 votes
1 answer
14 views

Next.js + RTK Query: How do I integrate server side rendering with RTK data fetching?

I want to render a static listing with cached HTML on initial page load using data that was fetched server side. I do NOT want to display a loading indicator on initial page load. I want to display ...
Daniel Tonon's user avatar
  • 9,804
-1 votes
0 answers
33 views

redux-toolkit No reducer provided for key "" [closed]

I'm getting the following error: No reducer provided for key "merchant" Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are ...
TEJAS's user avatar
  • 1
0 votes
1 answer
30 views

Too many state variables in a reducer, but I want my component to render only when one of them changes

I created a reducer with many state variables, And I am using it in my component like- let gridData = useSelector((state: State) => state?.auditReducer).gridData; will my component only update when ...
Meg's user avatar
  • 69
1 vote
0 answers
30 views

React component re-rendering issue with redux-toolkit [closed]

I created a component const Audit = () => { let auditReducer = useSelector((state: State) => state?.auditReducer); let [isDataGridLoading, setIsDataGridLoading] = useState(true); ...
Meg's user avatar
  • 69
-1 votes
0 answers
17 views

TypeError: Cannot destructure property 'currentUser' of 'useSelector(...)' as it is null

I am getting error Cannot destructure property 'currentUser' of 'useSelector(...)' as it is null. on this line const { currentUser } = useSelector((state) => state.user); in App.jsx Main.jsx ...
Hamza Azhar's user avatar
-1 votes
0 answers
17 views

Issue with Keycloak Redirect on App Refresh [closed]

i have two tabs open on the same browser, what i want to do is that if i login on one of the tab i dont want to be logged in on the second tab also. I am using redux toolkit redux persist and keycloak ...
Otonye Amietubodie's user avatar

15 30 50 per page
1
2 3 4 5
1550