aboutsummaryrefslogblamecommitdiff
path: root/compose.js
blob: b520983586154c42ad4d98702ae731966d84249d (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                 
import { createElement } from 'react';

const Compose = ({ providers = [], children }) => {
    if (providers.length < 0) {
        return children;
    }
    return providers.reduce((acc, cur) => createElement(cur, [], acc), children);
}

export default Compose;