35,426
questions
1
vote
2
answers
25
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....
0
votes
0
answers
12
views
what dependencies I should update, when I have updated my npm to version 20.17.0 (LTS) ? I have got many errors in my project [duplicate]
Sorry, I am a newbie and am learning the course of react and redux. After updating npm to v20.17.0 (LTS), my project started to run into errors and I dont know how to solve these problems. Please help ...
0
votes
1
answer
31
views
Why is the Payload Null in My Redux Action?
I am working on a React project using Redux (not Redux Toolkit) and facing an issue where the payload in my Redux action is null. I’m using Firebase for authentication, and I’m trying to dispatch the ...
1
vote
0
answers
21
views
Componentization in React-Native using redux toolkit to publish in npm
I'm currently working in some projects with React-Native and their design is similar to each other. Then comes the opportunity to make our custom components reusable.
We have custom component with a ...
0
votes
0
answers
22
views
How to implement Redux DevTools into my react native project?
I am using configureStore to create my store, I am trying do add access to the Redux DevTools extension (combined with the React Native Debugger), but the documentation I found only explains how to do ...
-1
votes
0
answers
24
views
Reducer keep return wrong state type
I am working on an app to which will using redux saga/persist in react native to manage state and actions. I has set return state correctly, make sure the reducer return TGlobalState, avoid state is ...
-1
votes
0
answers
39
views
Warning: Cannot update a component (`X`) while rendering a different component (`X`) [closed]
I'm developing react native app ,since DashboardScreen is the initial route after login ,I have pretty a lot of data should be handled properly .
the issue I'm facing now is when dispatch computCharts ...
-2
votes
0
answers
52
views
How to test a Redux component the right way?
For my studies I have to test a Redux application that I created. It is the first time I have to do something like that and I find it really challenging to figure out what to test, where to test and ...
0
votes
1
answer
61
views
Mapping in component with Redux and getting error noticesType.map is not a function
I have all the needed working pieces of the React Redux-toolkit working but I can't seem to get my data to display in the component. I'm getting the error:
TypeError: noticesType.map is not a ...
1
vote
1
answer
22
views
React do some work after dispatch store method in fulfilled reducer state
I have a dispatch method like this:
dispatch(fetchData(...)).then(() => {
// do some work after fulfilled
})
and in store I have this methods:
// ** Fetch Invoices
export const fetchData = ...
1
vote
1
answer
30
views
Is it safe to dispatch actions in store listener callbacks?
I have a Redux webpage with a complex UI component (a map). The component's visual state and its internal model depend on the current Redux store's state and browser state (viewport resolution, DPI, ...
0
votes
1
answer
64
views
How to trigger data fetching from an action with RTK Query?
I'm not new to Redux, but I am new to RTK and RTK Query. Back in the old days the way you'd trigger data to refetch whenever a specific action happened (I changed my form state, that means I want to ...
0
votes
3
answers
71
views
How do I resolve this ReferenceError: Cannot access 'authSlice' before initialization?
I have a problem using React together with Redux, the problem is this:
I'm getting an error:
ReferenceError: Cannot access 'authSlice' before initialization
I think the problem is that I have a ...
1
vote
1
answer
33
views
Redux-toolkit Reselect rerendering after any state change
I tried to create selector that select two variables from state and unites and returns them. But I encountered a problem, that selector causes rerendering after any state change.
import { ...
1
vote
2
answers
72
views
My state is not changing while the api request is correct
I am using Redux and when I send a get request to authenticate user it is working, creating a token in cookies, but in Redux the state is not changing. What am I doing wrong? When reloading the page ...