react-flatten-children
Version:
React utility to flatten fragments.
3 lines (2 loc) • 321 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.default=function r(t){return e.Children.toArray(t).reduce((function(t,n){return n.type===e.Fragment?t.concat(r(n.props.children)):(t.push(n),t)}),[])};
//# sourceMappingURL=react-flatten-children.cjs.production.min.js.map