This package has been deprecated

Author message:

Starting with React 16.2, React supports this out of the box with React.Fragment. See: https://reactjs.org/docs/fragments.html

react-siblings

1.0.2 • Public • Published

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>
];

Readme

Keywords

none

Package Sidebar

Install

npm i react-siblings

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • mkrause