Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History.length #286

Closed
tommoor opened this issue Apr 29, 2016 · 1 comment
Closed

History.length #286

tommoor opened this issue Apr 29, 2016 · 1 comment

Comments

@tommoor
Copy link

tommoor commented Apr 29, 2016

It would be great to have some way of inspecting the history, I'd like to be able to do something like the following:

if (history.length > 0) {
  history.goBack();
} else {
  // display something else
}

Length would be enough, but others might find a method to return the history stack itself useful? Perhaps I'm missing an API - but really can't see anything exposed in the docs.

@taion
Copy link
Contributor

taion commented Apr 29, 2016

Some earlier discussions: remix-run/react-router#843, #89, remix-run/react-router#767, remix-run/react-router#1376 (comment).

Unfortunately there's a lot of complexity in doing this right now, so we don't have a really great way forward on this.

@taion taion closed this as completed Apr 29, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants