All Questions
Tagged with redux javascript
13,538 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 {...
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-...
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 ...
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 ...
-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 ...
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 ...
0
votes
1
answer
50
views
Calling navigator.perrmissions.query from a generator
I am working with Redux Saga to perform actions like setting authorization and permissions once a user has logged in or has resumed a session. However, it appears that calling navigator.permissions....
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/...
2
votes
2
answers
68
views
How to avoid re-render in Redux based on the outputs of .filter()?
I have a simple scenario in which I want to access my store.entities, but only those which are active. I understand the following is bad because a new reference is given each time:
const ...
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 ...
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 ...
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: ...
3
votes
1
answer
65
views
Persist Store with Redux in React Native
I'm having a problem getting Redux-Persist to work and hoping to get some pointers if I've done something wrong.
Here is my Store.js
import { configureStore, getDefaultMiddleware } from "@reduxjs/...
-1
votes
1
answer
72
views
Redux Store - Access entire slice
Objective: Access the latest data from a slice in my Redux store in response to user input.
The Program: A React and Redux application, which has a button on a page. Upon being pressed, the button is ...
1
vote
2
answers
62
views
React Redux: Login Form Flickers on Page Refresh Despite User Being Authenticated
I'm building a React application using Redux for state management. My app checks if the user is already logged in by fetching authentication data from localStorage and dispatching it to Redux. However,...