5 ms·
I'm sorry, why would you be using React etc unless you wanted virtual DOM and JSX. Much of why I like React is precisely because it has those features. This rea
by awjr 9y ago
I'm sorry, why would you be using React etc unless you wanted virtual DOM and JSX. Much of why I like React is precisely because it has those features. This really makes no sense to me.
- mateuszf 9y agoYou can use React and virtual dom without JSX. Not that it's pleasant though.
- yomly 9y agoI definitely preferred Mithril's m('div') over JSX <div></div>. The closing tags are overly verbose for me.
- masklinn 9y agoFWIW the hyperscript helper is generally h rather than m, and there's a hyperscript helper available for react with the expected semantics[0]: https://github.com/mlmorg/react-hyperscript https://github.com/mlmorg/react-hyperscript [0] in the sense that it supports normal hyperscript semantics and replacing the selector with a React component
- mekkkkkk 9y agoAs soon as the markup reaches a certain level, the verbosity (closing tags in particular) of JSX benefits you more than the terseness of hyperscript. Of course you can argue that you should split your components into smaller chunks, but that is, in my experience, rarely good just for the sake of readability.
- brlewis 9y agoMy group tried Mithril both with and without JSX. With JSX was more readable for the code we were writing.
- masklinn 9y ago> Not that it's pleasant though. "Raw" react is perfectly OK, and react + hyperscript[0] is great. [0] https://github.com/mlmorg/react-hyperscript https://github.com/mlmorg/react-hyperscript