react-polyfill-fragment

1.1.0 • Public • Published

react-polyfill-fragment

Polyfill for React new Fragment api

Support

>= react@0.14.9

Usage

import Fragment from 'react-polyfill-fragment';

function List({ items }) {
  return (
    <Fragment>
      {items.map(item => <li>{item}</li>)}
    </Fragment>
  );
}

function App() {
  const items = [1, 2];
  return (
    <ul>
      <List items={items} />
    </ul>
  );
}

For more usage, see https://reactjs.org/docs/fragments.html

Package Sidebar

Install

npm i react-polyfill-fragment

Weekly Downloads

9

Version

1.1.0

License

MIT

Unpacked Size

3.08 kB

Total Files

4

Last publish

Collaborators

  • kingback