Socket
Book a DemoInstallSign in
Socket

@kobionic/react-compose

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kobionic/react-compose

A simple React component used to combine multiple components.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

React-Compose

Build status npm version License Code style

A simple React component used to combine multiple components.

Installation

npm install @kobionic/react-compose

Why?

const App = () => {
  return (
    <AProvider>
      <BProvider>
        <CProvider>
          <DProvider>
            <EProvider>
              <MyPage />
            </AProvider>
          </BProvider>
        </CProvider>
      </DProvider>
    </EProvider>
  );
};

Tired of this? Ok that can lead to nice art, but that's not really the point...

Usage

const App = () => {
  return (
    <Compose components={[AProvider, BProvider, CProvider, DProvider, EProvider]}>
      <MyPage />
    </Compose>
  );
};

Passing props

const App = () => {
  return (
    <Compose components={[AProvider, { component: BProvider, props: bProviderProps }, CProvider, DProvider, EProvider]}>
      <MyPage />
    </Compose>
  );
};

Authors

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Keywords

compose

FAQs

Package last updated on 23 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts