Closed ergofriend closed 1 month ago
Latest commit: 69735e4d41cb1edb054998634799a98015d7808f
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Hi! Since next-router-mock does not offer history support, we have ended up implementing something similar on our end. Just a quick ping that we would be interested in this feature being added to the library.
Thanks a lot!
Sorry, I lost the motivation to handle this.
Introduction
This PR proposes to support
history
in anticipation ofrouter.back()
support. A picture of future support is envisioned (like this code).As described in the React Router testing guide, React Router previously allowed explicit tracking of navigation history by passing the history object.
Ideally, centralizing state in the history object would eliminate the need for manual history restoration.
However, this pull request only implements location history recording at this stage.
Breaking Changes
history
property to MemoryRouterThis pull request change allows us to test the following...
Concerns
history
I would appreciate your input on the above concerns, as I think they are concerns. Thanks in advance!