#199: Messing with JSX
TRACK

#199: Messing with JSX

Avatar

I probably should have learned this long ago, but alas, here we are. Turns out you can tell what function you want JSX to use. Yep, JSX really only has one primary transformation that it does. It turns angle brackets in JavaScript into a function call. So, if you write a line like this in JavaScript:

<div class="big"Hello</div

After processing (probably with Babel and the JSX plugin), you’ll get, by default:

React.createElement("div", { class: "big" }, "Hello");… Read article “#199: Messing with JSX”

Comments

Avatar