Skip to content

vue-qs v0.2.8


vue-qs / QueryStateRef

Type Alias: QueryStateRef<T> ​

QueryStateRef<T> = Ref<T> & object

Defined in: composables/use-query-state.ts:23

A writable ref bound to a URL query key.

Assign .value (or use v-model) to update the URL, or call .set() to pass options and await the URL update.

Type Declaration ​

set() ​

set(value, options?): Promise<URLSearchParams>

Updates the state and queues a URL update. Pass null to remove the key (the state falls back to the default value).

Parameters ​

value ​

SetQueryStateValue<T>

options? ​

Options

Returns ​

Promise<URLSearchParams>

The search params once written to the URL

Type Parameters ​

T ​

T

Released under the MIT License. Questions or ideas? Join the GitHub Discussions.