4 ms·
(I'll re-link to sebmarkbage's answer here in case people see this post and get confused: https://news.ycombinator.com/item?id=8523876 https://news.ycombinato
by chenglou 12y ago
(I'll re-link to
sebmarkbage's answer here in case people see this post and get confused: https://news.ycombinator.com/item?id=8523876 https://news.ycombinator.com/item?id=8523876)
In short, this is somewhat of a transition step for the (imo) even better way of specifying your render with pure vanilla js collections. This goes in the opposite direction of what you're worried about. You can view `createElement/Factory` as the stepping stone, with the _additional_ benefit of allowing you to use es6 classes very soon. Smaller API surface and + using more js features rather than library-specific ones; what's not to like? =)
As for your worries about JSX: yes, it does come from React since the beginning. But we've taken an extra step of making it clear that this doesn't have to be React-specific: http://facebook.github.io/jsx/ http://facebook.github.io/jsx/. You can plug this in CoffeeScript. If not, see my previous point.
- rattray 12y agoHis concerns about JSX are the opposite of those you site, I believe; him (and I) want to use React without JSX whatsoever. As long as we can always do something like div className: 'foo', span className: 'bar' Custom className: 'baz' I think we'll be reasonably happy. But nobody likes feeling like a second-class citizen =)