The client the context is to offer, and the components it is offered to
Optionalfetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>The fetch function every exchange is ultimately performed by; defaults to the global one.
The components the client and its status are offered to.
The nested components, with the extended client and its status offered to them
Offers a shared fetch client to nested components.
Extends the client with the services every interface relies on: JSON is asked for unless an exchange states the content it expects on its own terms, and every exchange in flight counts towards the busy status, so that waiting is stated without any call site taking part.
Whatever a deployment settles for itself stays with the consumer: a client assembled with createFetch and handed over keeps the services above, with its own middlewares running closer to the network.
The client is assembled as the context first renders and kept for as long as it lives, so that exchanges are not disturbed by the interface around them: a client handed over later never replaces the one in use.