babel-plugin-transform-jsxspreadchild

7.0.0 • Public • Published

babel-plugin-transform-jsxspreadchild

Usage

.babelrc:

{
  "plugins": ["babel-plugin-transform-jsxspreadchild", "@babel/plugin-transform-react-jsx"]
}

Example

In

// @jsx h
<div>
  <a href="other.html">Link</a>
  <ul>
    {...[<li>Item A</li>, <li>Item B</li>]}
    <li>Item Last</li>
  </ul>
</div>

Out

// @jsx h
h('div', null,
  h('a', { href: 'other.html' }, 'Link'),
  h('ul', null,
    ...[h('li', null, 'Item A'), h('li', null, 'Item B')],
    h('li', null, 'Item Last')
  )
);

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
7.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
7.0.00

Package Sidebar

Install

npm i babel-plugin-transform-jsxspreadchild

Weekly Downloads

0

Version

7.0.0

License

MIT

Unpacked Size

3.09 kB

Total Files

11

Last publish

Collaborators

  • rhyzx