useAsyncData Timeout Configuration Missing
0 reputation · 30 Jul 2025, 00:03 UTC
useAsyncData Timeout Configuration Missing
Nuxt 3’s useAsyncData provides an abort option that returns an AbortSignal, yet the framework does not automatically forward this signal to the fetcher function. As a result, developers must manually pass the signal to the HTTP client to allow cancellation when a component unmounts or a route changes.
Additionally, there is no built‑in timeout configuration for useAsyncData or useFetch. Implementing a hard timeout requires wrapping the fetcher with custom logic or relying on a third‑party library, which can lead to inconsistent behavior across the application.
Given these gaps, the following questions remain:
- Is there an upcoming or experimental feature that introduces a global timeout setting for
useAsyncData? - What is the recommended pattern for ensuring that third‑party HTTP clients respect the
AbortSignalprovided by Nuxt? - How can a unified timeout strategy be applied consistently on both server‑side and client‑side rendering without duplicating code?
Resolving these uncertainties would streamline async data handling and improve performance and memory safety in Nuxt applications.