Home

020


May 7, 2020


Today was just a whole lot of trial and error in learning about React components and React.createElement. Honestly, I find JSX a little jarring, visually. I understand its appeal and can certainly see how it's much easier than using the JavaScript equivalent for React components, but as far as my own preference in code aesthetic is concerned, I'd much rather write in JS.

This:

React.createElement('title', null, `${props.title}`);

is so much more appealing than the JSX equivalent. JSX and HTML have all those elbows thrown everywhere. It's all jagged and harsh. JS is smooth and beautiful. Just my preference, just how I see it.

Anyway, looking forward to spending the weekend playing with this.

Comments? Follow me on twitter and drop me a line in response to this tweet:

Day 020: on that React learning path! Played with React components and the React.createElement method today.https://t.co/INMU7KQrSA#nonsensemod365 #thatCodingLife pic.twitter.com/LeF9NCAIKm

— Joshua Alexander (@nonsensecodes) May 8, 2020