Is there a way to `navigate` or go `back` when the next location matches the previous location?
Sometimes we want the next navigation to use
The implementation we have is to track the last location with
- interpolating the
- tracking the last location with
The above works but I'm wondering if we've missed something in the actual
back to clean up the history stack.The implementation we have is to track the last location with
useLocation and intercept calls to navigate and use history.back instead but it requires:- interpolating the
NavigateOptions like to, params, ...- tracking the last location with
useLocation and an effectThe above works but I'm wondering if we've missed something in the actual
navigate api or a better way than tracking the last location with useLocation.