Category "redux"

How to update state ( initial State ) objects in reducer when using immer?

If have a state of objects payload: export const initialState = { payload: { firstName: 'Mick', lastName: 'Andri', phoneNumber: '

Async/Await not executing as expected

I have the below method where I am updating store and after store updating, I am performing certain activities based on store values - useEffect(()=>{ const

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

disable other buttons using e.target.id

I have ten expansion panels. on click of one button in one expansion panel I need to disable other buttons in other expansion panel but the problem is when I tr

How to apply createEntityAdapter to createApi slice

I have implemented successfully a redux-toolkit api. Now Im trying to use createEntityAdapter to be able to use the pre-built selector methods. import { creat

How to cancel an entire redux saga chain from the leaf node

We have multiple sagas (ex: loadSampleData and loadCustomSampleData) that can be triggered by multiple different actions and can have multiple in-flight request

How to solve redux-persist failed to create sync storage. falling back to noop storage. in nextjs

Here is the version am using => "redux-persist": "^6.0.0", Error: => redux-persist failed to create sync storage. falling back to noop storage.

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

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

431 - (Request Header Fields Too Large)

First time posting a question please keep it in mind when reading Things i tried: Cleared my google chrome cache and cookies, tried incognito mode, updated my n

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