Prompt Frontend

Fetch Data with useFetch

Use Nuxt's useFetch or useAsyncData for SSR-friendly data loading.

vuenuxt
Insert label Data Fetching
Prompt

Fetch data using useFetch or useAsyncData. Handle loading, error, and empty states in the template. Use lazy option for non-blocking fetches, set a key for deduplication, and transform the response if the API shape doesn’t match what the component needs.

Add this to your Facet Inserts in Crystl for one-click access.

Get Crystl