react-http-fetch
Version:
An http library for React JS built on top of native JS fetch
16 lines (15 loc) • 677 B
TypeScript
import React, { ReactElement } from 'react';
import { HttpClientContextProps, HttpClientProviderProps } from './types';
/**
* The context to provide the default http client configuration.
*/
export declare const HttpClientContext: React.Context<HttpClientContextProps<unknown, unknown>>;
declare const memoizedProvider: React.MemoExoticComponent<{
({ config, children, }: HttpClientProviderProps<unknown, unknown>): ReactElement;
displayName: string;
}>;
export { memoizedProvider as HttpClientConfigProvider };
/**
* A utility hook to get the http client config context.
*/
export declare const useHttpClientConfig: () => HttpClientContextProps<unknown, unknown>;