UNPKG

@scaffold-ai/react-service-provider

Version:

React context-based service provider for dependency injection.

18 lines (17 loc) 720 B
import { default as React } from 'react'; import { Service } from './Service'; interface ServiceProviderProps { value: Service[]; children: React.ReactNode; } /** * ServiceProvider is a React Context Provider component that supplies an array * of Service objects to its child components. It uses the ServiceContext to * allow nested components to request the provided services. * * @type {React.FC<Service[]>} * @property {Service[]} value - The array of Service objects to be provided through the context. * @property {React.ReactNode} children - The child components or elements that will have access to the services. */ export declare const ServiceProvider: React.FC<ServiceProviderProps>; export {};