Category "redux"

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

" Objects are not valid as a React child (found: object with keys {})."

class Home extends PureComponent { render() { const { proList } = this.props; return ( <HomeWrap> <B

Using react redux with next.js

I try to use Redux with next.js starter project and I installed next-redux-wrapper on the project but I'm not sure where is the root file in this project. I try

dispatch in redux reducer (project created by tookit)

I want to dispatch in changeCategory reducer. how should I do it? I am using create-react-app tool Thanks export const searchParamsSlice = createSlice({ name:

Next.js: Reduce data fetching and share data between pages

I'm looking for solutions for better data fetching in a Next.js app. In this question I'm not just looking for a solution, I'm looking for multiple options so w

MERN Application - Problem with notifications and mapping array

I'm on a MERN stack to create a chat application. And when I'm trying to display notifications when there is a new message in another chatroom or a new PM I'm h

Redux Toolkit Query real time updates

is it possible get real time updates maybe I have a product and the amount of product goes from 2 to 1, can I show this in real time with rtk query ?

Preserve type argument in Redux connected component

I have a simple component that takes a type argument on props. When used, it infers the prop type and contextually types a callback param. However, when I wrap

TypeError: Cannot destructure property 'product' of 'productDetails' as it is undefined

**ProductDetailsScreen.js >>> Here is my code, I got the product list from Redux store, But facing a problem when initializing product details. ** e

NgRx Angular App not working with Redux DevTools

So I'm following this tutorial to get familiar with ngRx Entity, and for some reason my redux dev tools isn't 'lighting up' to indicate that it's in an app that

Where to dispatch multiple actions in redux?

I am using redux with connect and redux-thunk middleware and containers. Currently when an user perform an action, example one click on a button, I need to dis

Redux Toolkit: can I use createAsycThunk with Firebase listener functions (e.g. firestore.collection.onSnapshot)

Is there a way to use createAsyncThunk with Firebase listeners, for example firestore.collection.onSnapshot? It may not work because the way onSnapshot works (i

How can I dispatch an action using useEffect in main app.js?

I want to dispatch an action whenever any page or component of my app loads. So what I am trying to do is to dispatch the action using store.dispatch inside use

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

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

Why ESC generator in Redux Saga waits for promise to be fulfilled?

I am reading Redux Saga instruction docs as the below link: https://redux-saga.js.org/docs/introduction/BeginnerTutorial/ In the code in sagas.js, incrementAsyn

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

Redux-toolkit multiple AsyncThunk at one slice

What is the best approach to manage multiple AsyncThunk at single slice. Would be correct if I put computed properties of each async action? export const regist

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;