What was the reason react decided to create a jsx syntax rather use something like this:
const h1 = (str) => <h1>{str}</h1>;
const h2 = (str) => <h2>{str}</h2>;
const div = (arr) => <div>{arr}</div>;
const world = "world!"
const pureReactElement = div([
h1("hello "),
h2(world)
]);
Top comments (0)