/** * A hook that provides a way to fetch data with loading and error states. * Automatically handles the fetch lifecycle and provides a clean API. * * @param url - The URL to fetch from * @param options - Optional fetch options * @returns An object with data, loading state, error state, and refetch function * * @example * ```tsx * const { data, loading, error, refetch } = useFetch('/api/users') * * if (loading) return