compose/compose.js
Alexander Kiryukhin a08fd54e8b first commit
2019-08-02 00:41:10 +03:00

10 lines
263 B
JavaScript

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;