suspense-service

suspense-service / Exports / useService

Function: useService

useService<TResponse>(service: Service<any, TResponse>, id?: Id): TResponse

Synchronously consumes a response from a ServiceProvider

Type parameters:

Name
TResponse

Parameters:

Name Type Description
service Service<any, TResponse> the Service to use
id? Id the ServiceProvider id to use

Returns: TResponse

Defined in: Service/index.ts:65