mlmorg / react-hyperscript

Hyperscript syntax for React.js markup
MIT License
710 stars 45 forks source link

Component rendering support #3

Closed mlmorg closed 9 years ago

mlmorg commented 9 years ago

This adds support to render components inline with h(component). This makes way for easily supporting React v0.12 by allowing us to call React.createElement(component) for the user. More information.

New documentation here

cc @Raynos @malandrew @ross- @lxe

Raynos commented 9 years ago

Seems reasonable.

However exposing the entire React interface on h() seems crazy.

I would recommend exposing a small subset of the React interface on h(), maybe just a h.component() method.

I'd also recommend not coupling to the react interface, feel free to choose a small, simple component interface instead.

ross- commented 9 years ago

This seems to be an improvement. It's confusing to nest components inside tags at the moment.

mlmorg commented 9 years ago

@Raynos ok, I think I'll take out the React api exposing for now. I just don't know what pieces of it are used regularly to decide what to expose.