Nuxt · NUXT0016

Use explicit keys for refreshable async data

Finds Nuxt project code that can be written with a clearer framework-supported pattern.
NUXT0016vite-doctor/nuxtfetchingwarnSuggestion

Run this rule

pnpm nuxt doctor --rules nuxt/async-data-explicit-key-for-refreshable

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 async data explicit key for refreshable pattern instead.

Example

Add explicit refresh key

Before

const { data, refresh } = await useFetch('/api/profile')

After

const { data, refresh } = await useFetch('/api/profile', {
  key: 'profile',
})
Copyright © 2026