Posts by João C • 11 points
1 post
-
1
votes0
answers28
viewsQ: Prevent state from being lost when using history.push() - React-router-dom - Reactjs
I have a component that calls the API and stores the return in the state to display to the user. However, when I use the history.push() to navigate to another application page and then use the…