I have learned the hard way that state in useState is "ultimately updated" and the current value of it may not be the most latest. But does this happen with redux state as well? If I have many dispatches, am I at the risk of having an old state?
Asked
Active
Viewed 29 times
0
-
1This type of question is asked dozens of times a day on Stackoverflow. Take some time to learn about React hook state flow and how closures work. This is a duplicate of [The useState set method is not reflecting a change immediately](https://stackoverflow.com/questions/54069253/the-usestate-set-method-is-not-reflecting-a-change-immediately) – Andy Ray Apr 23 '23 at 22:43
-
Open your eyes, this is about redux state management. – Sourabh Yadav Apr 24 '23 at 06:42
-
You don't need to worry about redux state in that sense. "If I have many dispatches" is a bit vague - what exactly is your scenario you're concerned about? – timotgl Apr 24 '23 at 13:00