3 ms·
React works fine without JSX. var DOM = React.DOM; DOM.div() etc.
by jacobr 12y ago
React works fine without JSX. var DOM = React.DOM; DOM.div() etc.
- akrymski 12y agoSure - but that's quite horrible to write. And moreover it requires a sophisticated virtual DOM diffing algo, hence the size of React's library. I prefer to do this: render: function() { return { view: { classList: { editing: this.model.editing, completed: this.model.done } } } } Compared to outputting the entire HTML for the component in render().