React History Dengarkan Dapatkan Lokasi Sebelumnya

let prevLocation;

history.listen(nextLocation => {
  console.log(prevLocation);
  // ...
  prevLocation = nextLocation;
});
Long Lyrebird