A utility that help compose a bunch of components into a single one to avoid cases like provider hell.
npm install react-component-composer!npm (scoped)

!npm bundle size (scoped)
!npm
!Dependent repos (via libraries.io), scoped npm package

> A utility that help compose a bunch of components into a single one to avoid cases like provider hell.
Install with npm
``sh`
npm i react-component-composer --save
Install with yarn
`sh`
yarn add react-component-composer
- React Component Composer
- Table of Contents
- Usage
- API
- default export
- Development
- Install dependencies
- Watch mode
- Running tests
- Build
- Contributing
`js
import composeComponents from 'react-component-composer';
const Providers = composeComponents(
SomeProvider
[SomeProvider1, {someProps: 'SomeThing'}]
[SomeProvider2]
SomeProvider3
SomeProvider4
['div', {className: 'main'}]
)
function App() {
return (
)
}
`
Is a replacement for
`js`
function App() {
return (
)
}
This package has only one default export
Params
- ...args[] {React.ElementType | [React.ElementType, Record
Return: {JSX.Element}: The composed component
`sh`
yarn
`sh`
yarn
`sh`
yarn test
`sh``
yarn build
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue