arcx
Version:
A lightweight, dependency-free fetch utility for APIs and React.
18 lines • 741 B
TypeScript
import { PropsWithChildren } from "react";
import { ArcXConfig } from "./config";
/**
* Context for ArcX configuration in React.
*/
export declare const ArcXContext: import("react").Context<ArcXConfig<unknown> | null>;
/**
* A React provider component that automatically calls `configureArcX`
* with the props you pass in. Ideal for Next.js or React applications.
*
* @param props - ArcXConfig plus children for the provider.
*/
export declare function ArcXProvider({ children, ...config }: PropsWithChildren<ArcXConfig>): import("react/jsx-runtime").JSX.Element;
/**
* A convenience hook to retrieve ArcX's config from context, if needed.
*/
export declare function useArcX(): ArcXConfig;
//# sourceMappingURL=ArcXProvider.d.ts.map