Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Apply VueUse composables in Vue 3/Nuxt projects to replace custom implementations with battle-tested utilities.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/useRouteHash.md
1---2category: '@Router'3---45# useRouteHash67Shorthand for a reactive `route.hash`.89## Usage1011```ts12import { useRouteHash } from '@vueuse/router'1314const search = useRouteHash()1516console.log(search.value) // route.hash17search.value = 'foobar' // router.replace({ hash: 'foobar' })18```1920## Type Declarations2122```ts23export declare function useRouteHash(24defaultValue?: MaybeRefOrGetter<RouteHashValueRaw>,25{ mode, route, router }?: ReactiveRouteOptions,26): Ref<RouteHashValueRaw, RouteHashValueRaw>27```28