MCPcopy Index your code
hub / github.com/anttiviljami/react-openapi-client / OpenAPIProvider

Function OpenAPIProvider

src/OpenAPIProvider.tsx:14–20  ·  view source on GitHub ↗
({ children, ...clientOpts }: Props)

Source from the content-addressed store, hash-verified

12}
13
14export const OpenAPIProvider = ({ children, ...clientOpts }: Props) => {
15 const api = useMemo(() => new OpenAPIClientAxios({ ...clientOpts }), []);
16 try {
17 api.initSync();
18 } catch (err) {}
19 return <OpenAPIContext.Provider value={{ api }}>{children}</OpenAPIContext.Provider>;
20};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected