HTML and JS had a baby named JSX.

diomedes

Diomedes Lajara

Posted on December 19, 2018

HTML and JS had a baby named JSX.

First I opened up the terminal, ran npm to type "create-react-app jsx"
on the project then proceeded to delete everything inside the SRC folder and created index.js. Added a few comments to guide me using double backslash (//). Inserted React and ReactDOM imports. Followed by creating a Conts App for the newly created Component. Finally threw in a render method with ReactDOM and grabbing the root ID from the index.html using querySelector.

With this mixture of JSX elements inside the functional component and NPM start in the terminal, I ended up seeing my first component in the screen. “Live with React”

https://thepracticaldev.s3.amazonaws.com/i/43hynn9xzinadjhhxyvy.png

postone

💖 💪 🙅 🚩
diomedes
Diomedes Lajara

Posted on December 19, 2018

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Understanding JSX in React
javascript Understanding JSX in React

September 27, 2024

What is JSX?
javascript What is JSX?

January 2, 2023