The type of data returned by the fetcher
The type of error that can be thrown
The configuration type used to determine blocking behavior
The data returned by the fetcher function.
undefined during initial load or when key is falsyThe error object thrown by the fetcher function.
undefined when there's no error or when a request is in progress.
Function to mutate the cached data for this specific key.
This is a bound version of the global mutate function that automatically uses the current key, providing type safety and convenience.
Whether the request is currently being validated (loading fresh data).
true during initial load, revalidation, or when mutate is called
with a promise or async function.
Whether the request is in initial loading state.
true only during the initial load when there's no cached data.
Unlike isValidating, this becomes false once data is available.
The response object returned by SWR hooks.
This interface represents the return value of useSWR and related hooks, providing access to data, error state, and control functions.