A tiny polyfill for React.Fragment.
It will render a native React.Fragment
if supported. Otherwise, it will
wrap the children
within a selector. Default is div
.
Props | Type | Description |
---|---|---|
selector |
string |
A selector to render. Default div . |
React.Component
: A "Fragment" wrapped React component
import Fragment from '@helpscout/react-utils/dist/Fragment'
const Pedro = () => (
<Fragment>
<Napoleon />
<Debra />
</Fragment>
)