APIContext.useAPI()method

useAPI(this: void, endpoint: Endpoint<PP, RR>, payload: PP): EndpointStore<PP, RR>
useAPI(this: void, endpoint: Nullish<Endpoint<PP, RR>>, payload: PP): EndpointStore<PP, RR> | undefined

Get an EndpointStore for the specified endpoint/payload in the current APIProvider context.