mlmorg / react-hyperscript

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

Dev/initial #1

Closed mlmorg closed 9 years ago

mlmorg commented 9 years ago

cc @Raynos

andrewdeandrade commented 9 years ago

I agree with the approach where you pass in an array since it makes it easier to conditionally add children to an array that you then pass in to h(). I agree that using arguments is a significant de-optimization, but I'm also not so sure about the value of h() being a hot function since the children argument could be an array or null, which AFAIK is going to cause the browser to de-optimize (or prevent it from optimizing in the first place). IIRC only functions called in a way where the argument types never ever change are ever going to be optimized insofar as types are concerned.