jridgewell / babel-plugin-transform-incremental-dom

Turn JSX into IncrementalDOM
MIT License
145 stars 12 forks source link

Returning multiple elements #90

Closed zandaqo closed 6 years ago

zandaqo commented 7 years ago

Hello,

There is a long standing issue with JSX where it doesn't allow returning multiple elements from a function. While it makes sense for React, I don't think it should be the case with Incremental DOM. Since I don't expect it to be fixed in JSX any time soon, I have added a quick fix to my fork of this plugin. It basically foregoes adding opening and closing statements if the tag name of the element in question is specified as a wrapper in options. I am wondering if anybody else is interested in this feature and whether it can be implemented any better.