useQueryState
useQueryState(schema) is the main Vue Router adapter.
ts
import { useQueryState } from '@goranton/vue-url-state';
const query = useQueryState(schema);API
state: computed typed state fromroute.querypatch(patch, options?): updates URL queryremove(keys, options?): removes selected schema keysreset(options?): removes all schema keys
Behavior defaults
preserveUnknown: truecleanDefaults: truehistory: 'replace'
Use history: 'push' when you want browser history entries for updates.