Category "react-redux"

does redux change the reference of rootState object when a field's value in a sub state changes?

i have my redux states setup like this rootState subState1 field1 field2 subState2 field1 field2 multiple sub

Is there a way to overcome 401 unauthorized error in React, while trying to access data from Rapidapi.com?

I am facing the problem of unauthorized 401. Done everything mentally possible, so posting it here with code and result pics. The data when accessed like this r

How can I merge multiple reducers?

I have a file structure like below store index.js reducers organize index.js user index.js index.js trying to combine organize and user reducers to reducers/

React State update with button click from another component

Please read the details below of code enter image description here This MegaMenu Component import MenuIcon from '@mui/icons-material/Menu'; import './MegaMenu.c

RematchJS - how can I access the state in a model's effect without sending a payload to dispatch

I'm using RematchJS and I'd like to access the state in a model effect without sending a payload to the effect. The model looks something like this: export cons

OnClick event not working in map function react

I am unsure why I cannot use onClick on this within map function???I am getting the data from useSelector in my redux file. Clicking the TestComponent does noth

In React Router v6, how to check form is dirty before leaving page/route

Below are the package versions I'm using. React version - 16.13.1 react-router-dom version - 6.0.0-beta.0 react-redux version 7.2.0 Material UI version 4.11.0

How to reduce size on QR code scanner, customize QR code scanner

How can I reduce the size of my QR Code scanner. When I am trying to apply style prop, its not working In below code my scanner is working but it is coming on f

How to fix my old react project not working as expected?

I'm new to react and have just added some regex validation to a jsx file in an existing react project (created about 4 months ago) . After building a new bundle

useSelector of React Redux don't update state of store on expo react-native

I made the same model on the web and it worked, I tried to use shallowEqual of Redux as second parameter of useSelector function, also the _.isEqual of lodash

Undefined Error when Fetching API using RTK Query React/Redux

I keep getting this same error of undefined data for multiple components in my data, it was working fine but for some reason it stops in fetching data and start

Removing a value from an array using redux toolkit

I am new to using "@reduxjs/toolkit" (version "^1.5.1"). I am trying to remove an object from within the state's array (roundScore). This is usually something t

React state not updating after a post request?

I'm trying to send a post request to my backend with axios, and my backend gets the values with no problem, but I want to set a state of (sent) to true when the

React Native FlatList with custom buttons, how to change color on click?

I have created a FlatList that renders names. Each row has its own button. When you click the button, the name is added to a list and the button should change c

Do not fail whole task even if one of promises rejected

In redux saga if we want to handle multiple promises, we can use all (which is equivalent of Promise.all): yield all( users.map((user) => call(signUser, u

why componentdidmount called two times

I have React Component in componentDidMount fetch data from the server. The issue is componentDidMount called twice also the API called twice. I have a view inc

Streaming updates with RTK-Query mutation and updating cache

I'm using sockets to allow users to send messages in real-time. I read the RTK-Query documentation and saw an example for a query, where I would be fetching dat

how to change the asterisk color in required * field

I have two required fields in my form .I want the asterisk color should be red.Currently it is showing black .I am using material UI react library ? here is my

Handling different user types in react native

Many of the applications that I've seen or browsed through need to handle multiple different types of users whereby all users login / signup on one UI For examp

How to fix the problem of react app not loading in Safari?

I built an application by using create-react-app, react-redux, react-router-dom, and material UI. The app uses Fetch API for http requests. It's working in Chro