react-compose-provider
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

React Compose Provider

Easily build a single Provider out of many!

Installation

npm install --save react-compose-provider

Usage

import { composeProvider } from 'react-compose-provider';

const SimpleProviderA = (props) => (<>{props.children}</>);
const SimpleProviderB = (props) => (<>{props.children}</>);

const MainProvider = composeProvider(SimpleProviderA, SimpleProviderB);

const MyApp = () => (
    <MainProvider>
        <div>Hello World</div>
    </MainProvider>
);

/react-compose-provider/

    Package Sidebar

    Install

    npm i react-compose-provider

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    11.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • masterprompt