Closed tornqvist closed 6 years ago
This is a great idea. It'll need to be a semver major right?
Oops that dang close button is so close to the comment button :)
I'm not clear why this would be a major change. In what case would it be breaking stuff?
Since hash routing is enabled by default, changing it to be opt-in would break any app that currently relies on hashes being interpreted as part of the pathname.
How about adding the hash option with default true in a minor release and switching to false in v7?
A minor version defaulting to true would be a great way of getting this out there asap. I’m currently on vacation but can resolve the conflict and change the default in a day or two.
I switched it around to default hash routing to true
so that we can release this as a minor. Should revisit this, changing it to default to false
with next major release (see #563). Merging this now.
v6.13.0 🎉
Resolves #666, resolves #440
Both newcomers as well as seasoned choo users keep stumbling over this and resolve to hackish workarounds or complex subclassing of choo.
Making hash routing opt-in, hash anchors will behave as expected as per browser defaults. By opting into hash routing hashes will be transformed to be a part of the pathname (this is the current default behavior).
Example with default new behavior: https://choo-hash-anchors.glitch.me Example with hash routing enabled: https://choo-hash-anchors-enabled.glitch.me/my/app
I ended up factoring out nanolocation as the behavior had to be duplicated for location override.
This is most definitely a breaking change.