23,180 questions
0
votes
0
answers
96
views
Why doesn’t a deleted child component receive notifyNestedSubs() in React-Redux v9 with useSyncExternalStore (synchronous dispatch)? [closed]
I’m debugging a subscription-ordering issue in React-Redux v9 (React 18, modern useSyncExternalStore-based subscriptions). I have a parent component that conditionally renders a child based on Redux ...
Best practices
0
votes
2
replies
56
views
React RTK Typescript: Using `ReturnType<AppStore['getState']>` vs `ReturnType<typeof store.getState>` when inferring RootState type
I've been reading up on React/Redux documentation, specifically on setting up types for the main redux application store, and was wondering if there are any significant differences when it comes to ...
3
votes
1
answer
82
views
How do I pass data inside fetch function from createBrowserRouter to load content before page has loaded
I'm using react-persist in my application. When I click to add a product to my basket and then want to navigate to my basket page, how do I pass the basket data to the fetch function in the loader ...
-1
votes
1
answer
88
views
redux couldn't find store in react native 0.80
I have legacy application using vanilla redux and react-redux. I am facing this issue and unable to get root cause of this.
Could not find "store" in either the context or props of "...
1
vote
2
answers
140
views
How to display msg received in API response on page?
I have one function which checks for user authorization
export const authUser = (rideId, action) => {
return (dispatch, getState) => {
const postData = {
consumer: "Rapi",
...
2
votes
1
answer
92
views
How to use parametrized queries in selectors?
I'm working on a React app with Redux-Toolkit (RTK) Query. I need to fetch accounts from the server and then render them as well derive some data from them through a chain of selectors. If I fetch ...
2
votes
2
answers
41
views
React-Redux ShopCart Application (Remove_from_cart)
I am currently working on a React-Redux based Cart app, and I am experiencing the following problem:
When I continuously click the remove button in order to remove a product from my cart, the ...
1
vote
1
answer
48
views
How to preserve specific properties effectively when merging nested state in Redux?
In our reducer, we’re updating a nested array with new data coming from the backend.
However, certain UI-specific properties (like tooltip) that are not part of the backend response need to be ...
0
votes
1
answer
331
views
Module '"redux"' has no exported member 'CombinedState'.ts(2305)
when I upgrade the redux version from 4.2.1 to 5.0.0, shows error:
Module '"redux"' has no exported member 'CombinedState'.ts(2305)
I have read the official release notes: https://github....
0
votes
2
answers
62
views
How can I create takeOne effect creator in Redux Saga?
I want a Redux Saga effect creator that only takes the first dispatched action of a pattern and ignores the rest. How can I create it? For example here Saga docs explains how takeEvery is created.
I ...
-1
votes
1
answer
274
views
vi.spyOn(reactRedux, 'useDispatch') is not working / "TypeError: Cannot redefine property: useDispatch"
I don't seem to find a solution for the below code / test to work (I went through a lot of articles and stackOverflow...). Various solutions provided by chatGPT are useless as well. I also see people ...
0
votes
1
answer
94
views
Redux State Sharing in Microfrontend Architecture | 1 host, 1 remote example
I have currently a host - container and a remote - dashboard.
I have a full blown redux+saga setup at my container, which I am exposing to remote using Module federation as well.
plugins: [
new ...
3
votes
2
answers
78
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
0
answers
101
views
How to Maintain Dynamic RTK Query Tag Validation and Invalidation for Multiple API Slices in Redux Toolkit?
I'm working on a project using Redux Toolkit (RTK) Query to manage multiple API endpoints, where each API slice is constructed dynamically through a function. My goal is to maintain a dynamic approach ...
-2
votes
1
answer
164
views
How to prevent re render of all items in a nested flashlist with redux
Hi all so I'm working with a flattened json data for a menu component and everything works fine ,my issue is whenever i update the quantity of a particular item in the menu or decrement it my whole ...