'How to Handle .then() async redux call in Functional React?
I was using class based React with redux till now, but due to some reasons had to shift to functional components.
Earlier in class used to handle code post action call in .then
for example
this.props.someAction() //axois /fetch async request
.then(()=>{
this.props.someValue;
})
So used to get all the details in .then()
But in functional in .then cant get the updated props values coming from store.
have to use useEffect hook
can someone help me with a best solution to avoid calling useEffect even on first load?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
