Skip to content

vue-doctor/nuxt/nuxt-async-client-component ​

Avoid async setup in client components. Use useFetch() or useAsyncData() instead

PropertyValue
CategoryNuxt
Default Severitywarning
Confidencemedium
FixableNo
Engineoxlint
Sincev1.0.0
Frameworksnuxt
Test filesNot checked (which files)

Why it matters ​

Avoid async setup in client components. Use useFetch() or useAsyncData() instead

How to fix ​

Review the finding and update the code according to best practices below.

Agent Guidance ​

Avoid await in the setup of a client-only component. Fetch with useAsyncData()/useFetch() or load in onMounted with a loading state.


Rule source: vue-doctor/nuxt/nuxt-async-client-component

Released under the MIT License.