Nuxt · Data fetching

NUXT0028Use stable keys for async data payload entries

Checks that Nuxt fetch code includes the stable useAsyncData key needed for predictable behavior.

Why it happens

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

Fix

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'))

Verify the fix

Run only this rule after editing so the report stays focused on the diagnostic you are closing:

pnpm nuxt doctor --rules nuxt/fetch/require-stable-asyncdata-key
Copyright © 2026