Category "react-redux"

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 = {

What does this render method do: const {images, selectedImage} = this.state;?

I'm doing a simple tutorial on react/ redux and I do not understand why we have to, in the render() method, do const {images, selectedImage} = this.state;

Why componentDidMount gets called multiple times in react.js & redux?

I read componentDidMount gets called only once for initial rendering but I'm seeing it's getting rendered multiple times. It seems I created a recursive loop.

React Material UI show progress in Table while waiting on data

I know it is possible to show Circular progress over the as-yet-to-be-populated table. How do you do it? As it stands right now the table says No records to d

TypeError: TypeError: (0, _reactRedux.useSelector) is not a function

I am working on useSelector of react-redux inside my React Native application, I am getting the following error: TypeError: TypeError: (0, _reactRedux.useSele

A component suspended while responding to synchronous input

error Error: A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that s

React Native FlatList gets infinity loop onRefresh

I'm trying to fetch data from redux to a FlatList and onRefresh={} gives me an infinity loop. When I don't use redux it works but when I moved my fetching into

React Native Context rendering a blank screen when wrapped inside <Provider>

I'm trying to build a simple blog native app using context and have stumbled upon an issue to which I can't find a root to. Here's the structure of it: /context

react-google-login not calling onSuccess

In the following snippets I'm trying to implement google oauth into my webapp using npm react-google-login. When I try to sign-in, the popup appears, I select o

Error: Cannot find module 'C:\XXX\XXX/config-overrides'

I have created a sample react/redux/.net core app by using this Tutorial. But when I try to start the application with npm start I get the 'cannot find module e