3 ms·
> If someone starting with React sees all that React.create element, they will run away. That's a possible reaction. Other developers would refactor instead of
by antris 11y ago
> If someone starting with React sees all that React.create element, they will run away.
That's a possible reaction. Other developers would refactor instead of running away, though. Not using JSX doesn't mean typing React.createElement all over the place.
var e = React.createElement
And you already have much neater code. You can even go further and create functions for p, h1, input etc. and you're almost down to the expression power of JSX. And as a bonus, you don't have to spend time learning the JSX compiler and syntax.