jridgewell / babel-plugin-transform-incremental-dom

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

Wrap JSX roots in hoisted sibling functions #28

Closed jridgewell closed 9 years ago

jamiebuilds commented 9 years ago

Looks fine, but you may want to find ways to eliminate some of this state being added to nodes.

jridgewell commented 9 years ago

I could probably move _iDOMisRoot into the path's data object?

jamiebuilds commented 9 years ago

Well, generally in babel the answer is nested visitors.

So the initial visitor hits a root iDOM node. It holds onto that information in memory and then creates a new visitor that traverses down the tree.

jridgewell commented 9 years ago

Pushing the nested visitor discussion into #29.