Skip to main content

All Questions

-1 votes
0 answers
32 views

Redux Dev Tools updating but console or state not updating

In my Next.js project where I use Redux, I run the addToCart action with useDispatch and it reaches the reducer but the state is not updated. You can check the codes right there basketSlice.ts import {...
Skyami's user avatar
  • 45
0 votes
0 answers
29 views

Redux toolkit synchronization between server store and client store not working

I have set up an apiSlice on the server to fetchProducts in Next.js but the client is not getting the server side store info. There seems to be a lot of conflicting information out there with next-...
Richard's user avatar
1 vote
1 answer
23 views

rtk query and store management

I understand that RTK Query signifies a shift in thinking from Redux store / state management, and the general paradigm is that you use the RTK Query endpoint anytime you need data, and rely on it to ...
user101289's user avatar
  • 10.5k
1 vote
1 answer
32 views

RTK Query Mutation with selector

I've used redux toolkit for a few years and I'm pretty familiar with it. I'm going through and attempting to update old code using the newer RTK Query strategy to replace some of my old slices and ...
user101289's user avatar
  • 10.5k
-1 votes
1 answer
54 views

dispatching two consecutive asyncthunk actions resulting in inconsistent behaviour

I'm building a nextjs app with redux and I'm at the point where I'm dispatching two consecutive asyncThunk actions to the backend api, one action sends a DELETE request and the other sends a POST ...
bader322's user avatar
0 votes
0 answers
261 views

NextJS 15: Error occurred pre-rendering page, with redux toolkit installed

I have created an nextjs 15 app and I have redux toolkit used in it. When I run the build, it throws an error Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/...
Vishnu's user avatar
  • 1
1 vote
2 answers
56 views

Issue with Redux - Store does not have a valid reducer

I am currently facing an issue with Redux coding in which this statement is coming up: Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values ...
Ismael Sanchez's user avatar
1 vote
1 answer
48 views

@reduxjs/toolkit - createSelector with parameters

I have a ReactJS app with Redux and a couple of createSelector but some of them I would like to change. Here are examples of the current selectors: export const getAppData = createSelector( (state: ...
Gutelaunetyp's user avatar
  • 1,882
1 vote
1 answer
89 views

Selector unknown returned the root state when called. This can lead to unnecessary rerenders

I'm working on a React application using Redux and I’ve encountered a warning related to the useSelector hook. I am trying to extract data and loading state from multiple slices of the Redux store, as ...
Princy Patel's user avatar
2 votes
1 answer
112 views

React using createSelector with dynamic arguments

I created selectors to get a list of users like so: const selectGroup = (state) => state.group; const selectGroupUsers = createSelector( [selectGroup], (group) => group.get('users').toJS() )...
user2456977's user avatar
  • 3,974
1 vote
1 answer
46 views

React component will not update when using redux and createSelector, not detecting UI changes

I created a selector of users in a group in my immutable redux state: import { useStore } from 'react-redux'; import { createSelector } from '@reduxjs/toolkit' const selectGroup = (state) => state....
user2456977's user avatar
  • 3,974
2 votes
1 answer
57 views

Why is my api data saying fulfilled but returning undefined?

I'm using the GameSpot API in my React Redux web app (set up with Vite). I'm seeing undefined data in my components, although Redux DevTools shows each query state as fulfilled with data visible there....
mattsteen14's user avatar
-1 votes
1 answer
34 views

Data in two different pages does not get updated immediately on UI with Redux Toolkit

I have a react 18 app and I am using Redux Toolkit for state management. Below is an image of the blogs app on the users page. When I add/create a new blog on the blogs page, the new blog gets added ...
qqq's user avatar
  • 956
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
3 answers
114 views

How to initialize redux slice with enum value?

I am trying to set initial state of redux slice with a enum value, but it throws Uncaught TypeError: undefined has no properties. The code is: export const themeTokenSlice = createSlice({ name: &...
Boi Stance's user avatar

15 30 50 per page
1
2 3 4 5
37