@hateoas-ts/resource-react - v1.4.0
    Preparing search index...

    Type Alias UseResourceResponse<T>

    The result of a useResource hook.

    type UseResourceResponse<T extends Entity> = {
        data: T["data"];
        error: Error | null;
        loading: boolean;
        resource: Resource<T>;
        resourceState: State<T>;
    }

    Type Parameters

    • T extends Entity
    Index

    Properties

    data: T["data"]

    The 'data' part of the state

    error: Error | null

    Will contain an Error object if an error occurred

    loading: boolean

    True if there is no data yet

    resource: Resource<T>

    The resolved resource object

    resourceState: State<T>

    A full Resource State object