- useClient<ContentTypes>(onError?): {
client: null | Client<ContentTypes>;
disconnect: (() => Promise<void>);
error: null | Error;
initialize: ((__namedParameters) => Promise<undefined | null | Client<any>>);
isLoading: boolean;
} Type Parameters
ContentTypes extends DefaultContentTypes = DefaultContentTypes
Parameters
Optional
onError: ((e) => void)
Returns {
client: null | Client<ContentTypes>;
disconnect: (() => Promise<void>);
error: null | Error;
initialize: ((__namedParameters) => Promise<undefined | null | Client<any>>);
isLoading: boolean;
}
disconnect: (() => Promise<void>)
- (): Promise<void>
Returns Promise<void>
error: null | Error
initialize: ((__namedParameters) => Promise<undefined | null | Client<any>>)
- (__namedParameters): Promise<undefined | null | Client<any>>
Parameters
__namedParameters: InitializeClientOptions
Returns Promise<undefined | null | Client<any>>
isLoading: boolean