Home > @cerbos/react > AsyncResult
The result of calling an async method on a client.
Signature:
export type AsyncResult<T> = {
isLoading: true;
data: undefined;
error: undefined;
} | {
isLoading: false;
data: T;
error: undefined;
} | {
isLoading: false;
data: undefined;
error: Error;
};