react-siblings
Small utility component that takes advantage of React 16's ability to return an array of elements
from a component. All children are given a key
and returned as array.
import Siblings from 'react-siblings'; const MyComponent = <Siblings> <div>foo</div> <div>bar</div> </Siblings>;
This is equivalent to:
const MyComponent = <div ="0">foo</div> <div ="1">bar</div>;