Answers for "react history listen get previous location"

-1

react history listen get previous location

let prevLocation;

history.listen(nextLocation => {
  console.log(prevLocation);
  // ...
  prevLocation = nextLocation;
});
Posted by: Guest on January-20-2021

Code answers related to "react history listen get previous location"

Code answers related to "Javascript"

Browse Popular Code Answers by Language