UNPKG

@nixjs23n6/react-nest-providers

Version:

A lightweight, type-safe utility for composing multiple React providers into a single, nested tree. Simplify your provider setup with a clean, declarative API that supports optional props and seamless integration with TypeScript. Perfect for managing cont

6 lines (5 loc) 253 B
import { ComponentType, ReactNode, FC } from 'react'; export type ProviderWithProps<P = any> = [ComponentType<P>, P?]; export declare const buildProvidersTree: <P extends ProviderWithProps<any>[]>(providers: [...P]) => FC<{ children: ReactNode; }>;