Category "react-redux"

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

Why does ngrx/store example app use multiple stores? (how to design store)

I am trying to make a rather big, scalable application and I was told it is best practice to have one single store storing the current global state (including b

redux-persist is not saving my redux state when I refresh or close my react-native app

My react-native app is not saving my data using redux toolkit, redux-persist and asyncstorage import AsyncStorage from '@react-native-async-storage/async-storag

Formik Initial Values out of Sync with Redux

This form is used to edit a user profile. It should load with up to date user data for the initial values. To handle this, I've added a redux fetchUser action i

How do I add an element to array in reducer of React native redux?

How do I add elements in my array arr[] of redux state in reducer? I am doing this- import {ADD_ITEM} from '../Actions/UserActions' const initialUserState = {