1.0.2 • Published 7 years ago

react-siblings v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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 = props =>
    <Siblings>
        <div>foo</div>
        <div>bar</div>
    </Siblings>;

This is equivalent to:

const MyComponent = props => [
    <div key="0">foo</div>,
    <div key="1">bar</div>
];
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago