3 ms·
No pre-deploy build chain is required. Even jsx can be compiled on the browser, seamlessly.
by pknopf 9y ago
No pre-deploy build chain is required.
Even jsx can be compiled on the browser, seamlessly.
- masklinn 9y agoNo build chain is required, you don't even need JSX.
- pknopf 9y agoCorrect, but it is more verbose and ugly to not use JSX. I guess the argument is you shouldn't be compiling things on the clients browser.
- masklinn 9y ago> Correct, but it is more verbose and ugly to not use JSX I don't agree with that. I tend to prefer hyperscript to JSX (for personal projects) and I think it looks perfectly fine. > I guess the argument is you shouldn't be compiling things on the clients browser. How's that an argument at all?
- pknopf 9y agoYou are saying this... var rootElement = React.createElement('div', {}, React.createElement('h1', {}, "Contacts"), React.createElement('ul', {}, React.createElement('li', {}, React.createElement('h2', {}, "James Nelson"), React.createElement('a', {href: 'mailto:james@jamesknelson.com'}, 'james@jamesknelson.com') ), React.createElement('li', {}, React.createElement('h2', {}, "Joe Citizen"), React.createElement('a', {href: 'mailto:joe@example.com'}, 'joe@example.com') ) ) ) ...is just as readable as this? var rootElement = <Div> <H2>Contacts</H2> <Ul> <Li> <H2>James Nelson</H2> <A href="mailto:james@james.com"> james@james.com </A> </Li> </Ul> </Di> The whole point of JSX is to make working with React more like html, because it is easier and more readable. > How's that an argument at all? Huh? You mean, the argument that you shouldn't be sending un-compiled content to the client? I don't know why I'd have to argue for this, but render speed is one of the big reasons. Also download size. If you don't recompile, you have to include babel as well, on the client.
- Touche 9y agoYep, and it wasn't required of Dojo either. Optional complexity doesn't make something any easier to understand, especially when most documentation and community expects you to use the complex parts.
- pknopf 9y agoYou are right, I see why OP's initial statement was wrong about React being "simple" because you could make it simple. Did Dojo expect the community to use the "optional complexity"?