Closed stackoverfloweth closed 1 day ago
Name | Link |
---|---|
Latest commit | a59a5556a38a1d0ae425c70c57ce771d68f8f415 |
Latest deploy log | https://app.netlify.com/sites/kitbag-router/deploys/66f8118583b2620008653343 |
Deploy Preview | https://deploy-preview-267--kitbag-router.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
This PR introduces a type and service for Hash similar to
Path
,Query
, andHost
. Each of these parts of the url can be defined when callingcreateRoute
. It's normalized fromstring | undefined | Host
onRoute
and is combined down from parent routes to children routes. Host is checked for route matching rules, route scoring (for multiple matches), and is used when assembling a URL for a given route.Some places where
Host
is differentparam
on the host typehasValue: () => boolean
to the type. I found this useful because host will insert "#" only when there is a value that passesstringHasValue
check.host
utility when callingcreateRoute
but it won't offer any utility over a plain string{ host: string }
in the options, theroute.hash
wins over theoptions.hash