Nuxt · NUXT0028

Use stable keys for async data payload entries

Checks that Nuxt fetch code includes the stable useAsyncData key needed for predictable behavior.
NUXT0028vite-doctor/nuxtfetchingwarnSuggestion

Run this rule

pnpm nuxt doctor --rules nuxt/fetch/require-stable-asyncdata-key

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.

Add stable useAsyncData key where Nuxt expects it, close to the code that depends on it.

Example

Use stable async data keys

Before

const key = Date.now().toString()
const { data } = await useAsyncData(key, () => $fetch('/api/user'))

After

const { data } = await useAsyncData('user', () => $fetch('/api/user'))
Copyright © 2026