jridgewell / babel-plugin-transform-incremental-dom

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

Component Support #17

Closed jridgewell closed 8 years ago

jridgewell commented 8 years ago

An initial Component support, which intentionally punts on what to do with attributes. With the way iDOM is currently handling notifications ("create" and "delete"), it'd be very hard to pull attributes into a hash to push into the notification function. Instead, retrieve them with getAttribute / this[prop] on the component's root element.

Closes #9.

TODO

ianmstew commented 8 years ago

In response to the TODO questions, could there be a way to declare a static renderComponent(Component, props, children) method whose return value maps into the iDOM tree? I realize this could be tough at the babel plugin level, but letting the plugin user define the translation seems necessary for this feature to remain framework-agnostic.

jridgewell commented 8 years ago

Closing this initial PR in favor of #43.