solidjs / solid-router

A universal router for Solid inspired by Ember and React Router
MIT License
1.14k stars 146 forks source link

fix(#396) - useLocation().state does not get updated on history back on same URL #397

Closed r-Larch closed 6 months ago

r-Larch commented 6 months ago

This change should ensure useLocation().state reflects history.state on history back and reactively updates.

NOTE: I have not tested this change! I don't know how this behaves with solid-routers state: {_depth: number} special property.

changeset-bot[bot] commented 6 months ago

⚠️ No Changeset found

Latest commit: b8c0e508bd27618ae556cabb61dbca2a4d67fa43

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.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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](https://github.com/r-Larch/solid-router/new/patch-1?filename=.changeset/light-pandas-kneel.md&value=---%0A%22%40solidjs%2Frouter%22%3A%20patch%0A---%0A%0Afix(%23396)%20-%20useLocation().state%20does%20not%20get%20updated%20on%20history%20back%20on%20same%20URL%0A)