All skills

Use when working with VueUse composables - track mouse position with useMouse, manage localStorage with useStorage, detect network status with useNetwork, debounce values with refDebounced, and access browser APIs reactively. Check VueUse before writing custom composables - most patterns already implemented.

  • 251 files
  • 167.3 KB
  • MIT
  • Updated 7 months ago
  • GitHub

Use this Skill: https://skilld.dev/gh/onmax/claude-config/vueuse

This session only. Nothing lands on disk.

composablesuse-fetch.md

≈421 tokens on demand. Your agent reads this file only when SKILL.md points to it.

useFetch

Reactive Fetch API provides the ability to abort requests, intercept requests before they are fired, automatically refetch requests when the url changes, and create your own with predefined options.

Package: @vueuse/core Category: Network

Usage

import { useFetch } from '@vueuse/core'

const { isFetching, error, data } = useFetch(url)

Options

Option Type Default Description
fetch typeof window.fetch - Fetch function
immediate boolean true Will automatically run fetch when useFetch is used
refetch MaybeRefOrGetter<boolean> false Will automatically refetch when:
initialData any null Initial data before the request finished
timeout number 0 Timeout for abort request after number of millisecond
updateDataOnError boolean false Allow update the data ref when fetch error whenever provided, or mutated in the onFetchError callback
beforeFetch (ctx: BeforeFetchContext) => Promise<Partial<BeforeFetchContext> | void> | Partial<BeforeFetchContext> | void - Will run immediately before the fetch request is dispatched
afterFetch (ctx: AfterFetchContext) => Promise<Partial<AfterFetchContext>> | Partial<AfterFetchContext> - Will run immediately after the fetch request is returned.
onFetchError (ctx: OnFetchErrorContext) => Promise<Partial<OnFetchErrorContext>> | Partial<OnFetchErrorContext> - Will run immediately after the fetch request is returned.

Reference

VueUse Docs

Source: SKILL.md on GitHub

No third-party reports yet.

Signed by skilld at 50538df. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 12 hours ago.

Activeupdated 7 months ago

README badge

README badge for onmax/claude-config/vueuse