Skip to main content

All Questions

Tagged with
3 votes
2 answers
69 views

Can I use a variable index in a useSelector call?

Suppose I have a long list of playerData in my redux store, and some players' data gets updated very often. Let's say I have a Player component and inside of it I want to access that player's specific ...
EKW's user avatar
  • 2,153
1 vote
2 answers
58 views

Redux Persisted Data Not Saving on Reload

I've looked at a number of forum posts prior to posting and still have not found a solution. I am storing data using Redux which is working as intended. I store it in SignIn.js and after navigating to ...
mfusco's user avatar
  • 57
1 vote
1 answer
59 views

useEffect not triggering when redux state dependency is updated

I have a pretty simple Tile component that I want to change color when it's hovered (along with other associated components.) Right now it sets a Redux state when the component is hovered on. After ...
Ed McKenna's user avatar
0 votes
0 answers
106 views

Redux toolkit: Data separation for multiple apps - Write & Read from one and the same sessionStorage

At first some basic details about my issue: A service portal (hosted by other teams) Exactly one browser tab where users are logged in into this Service Portal Within the Service Portal, my ReactJS ...
Gutelaunetyp's user avatar
  • 1,882
1 vote
1 answer
57 views

weird react behaviour that i recently noticed

I am working on a React component (FSRenderer) that fetches and transforms data, then renders a grid and a header. My issue is related to the loading state managed by Redux and how the rendering ...
meg's user avatar
  • 123
1 vote
1 answer
52 views

TypeError: 0, _redux.combineReducers is not a function (it is undefined)

I'm trying to upgrade redux on my react-native project (uses Expo SDK 52) to these versions: react-redux 8.0.7 ❯ 9.1.2 redux 4.2.1 ❯ 5.0.1 redux-thunk 2.4.2 ❯ 3.1.0 When ...
Vladimir I's user avatar
1 vote
2 answers
67 views

How to fetch token before RTK query using a custom middleware?

I am trying to create Redux middleware which fetch token (lately will check if token is expired but for testing purpose I now only fetch token). Every time RTK-Query starts its action. My issue is ...
Jakub Husařík's user avatar
0 votes
0 answers
43 views

Why doesn't Redux Persist store data in localStorage [duplicate]

I am using Next.js and trying to use Redux Persist to save data so it remains even after a page refresh. However, when I refresh the page, the old data is gone. I'm not sure where I'm making a mistake ...
boyenec's user avatar
  • 1,637
0 votes
1 answer
49 views

Typescript Error: Argument of type '{ task: string; }' is not assignable to parameter of type 'void'

Getting this error when trying to pass an argument through the dispatch method. Error: Argument of type '{ task: string; }' is not assignable to parameter of type 'void' index.tsx: import store from ...
Sid's user avatar
  • 21
0 votes
0 answers
44 views

AG Grid columnState in redux let ColumnMovedEvent is fired twice

i store the AG Grid columnState into redux when a column is moved but it always reset the order because the columnMoved event is fired twice, first with the new order, second with the old order. If i ...
mn3's user avatar
  • 135
1 vote
1 answer
120 views

Redux Toolkit store resets when navigating via URL input, but works fine with React Router navigation

I'm facing an issue with Redux Toolkit where the store resets back to its initial state when I manually type a URL in the browser's address bar (e.g., /admin). However, if I navigate between pages ...
Trần Tuấn Hưng's user avatar
1 vote
1 answer
83 views

Error While using Redux - Uncaught TypeError: Cannot read properties of undefined (reading 'items')

I'm trying to access states from the redux store using useSelector(), but instead I get the following error- AddToCart.jsx:7 Uncaught TypeError: Cannot read properties of undefined (reading 'items') ...
Aviral Mehrotra's user avatar
0 votes
2 answers
309 views

Next.js Redux with redux-persist hydration error

I got Next.js application with Typescript and I'm trying to make redux work with redux-persist, if the state in slice is same as the initial state, the application works fine, but if it actually have ...
Jakub Hampl's user avatar
1 vote
1 answer
41 views

React mapStateToProps state calling reducers infinitely

const mapDispatchToProps = dispatch => ({ getUsers: (payload) => dispatch({ type: "USERS", payload: payload }) }); const mapStateToProps= state => ({ ctr: state.TestReducer, ...
Music's user avatar
  • 29
1 vote
2 answers
230 views

Async/Await Not Working with Redux Dispatch Function in React

In this code snippet I want to know why async and await not working. This code in my component I am sure that is no errors: const { success, loading, error } = useSelector( (state) => state....
khaled saeed's user avatar

15 30 50 per page
1
2 3 4 5
740