remix-run / history

Manage session history with JavaScript
MIT License
8.29k stars 961 forks source link

Need history.BackTo(string) #948

Open payneio opened 2 years ago

payneio commented 2 years ago

If this package had a history.BackTo('/<path>') method, it could be used to entirely match the capabilities of native mobile navigation APIs. This would allow developers to specify a path (or better, a match pattern) and, when called, the history would be popped back to the first location matching that path... or a default root path (e.g. "/") in the case the path is not found in the history.