Nuxt · NUXT0027

Prefer Nuxt data factories for custom data composables

Finds Nuxt fetch code that should use the supported create use fetch pattern instead.
NUXT0027vite-doctor/nuxtfetchinginfoSuggestion

Run this rule

pnpm nuxt doctor --rules nuxt/fetch/prefer-create-use-fetch

Why it matters

Nuxt data fetching relies on stable keys, payload serialization, and request context. Bypassing those contracts can duplicate requests or lose SSR data.

Use the Nuxt-supported create use fetch pattern instead.

Example

Use create use fetch

Before

export function useOrders() {
  return useFetch('/api/orders')
}

After

export const useOrders = createUseFetch('/api/orders')
Copyright © 2026