3 ms·
React does not require JSX; it is just a sugar over React.createElement. By way of example: <h1 className="title">Hello World</h1> React.createElement('h1', {
by seangrogg 9y ago
React does not require JSX; it is just a sugar over React.createElement. By way of example:
<h1 className="title">Hello World</h1>
React.createElement('h1', { className: 'title' }, 'Hello World');
A very contrived example but it's pretty simple to see that if you're coming from a background where you previously used a lot of "JavaScript in HTML" and aren't used to "Markup in JavaScript" it makes for a good middle ground. As well, as you can likely infer from the example, when you start dealing with various nested children the pure JavaScript solution can get somewhat unwieldy; though that comes down to taste, mostly.
While I empathize with your position (I'm not a big fan of the transpilation trend) I do find React to be much more sane than Angular 1.x was and much more relevant to what I build than jQuery.