From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Introduction to Babel and JSX
From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment
Introduction to Babel and JSX
All right, so we are bringing in these two extremely powerful packages of code by pointing our source of the script at them. They're basically endpoints that we then bring in, and then now we have access to them. How do we actually use them? Well, what we can do now is we can start using their methods. So one method we need to use in order to get to render React as a React is to use the React DOM render method. So uppercase underneath our constant app, we're going to do React DOM, all uppercase, dot render. That's not how you spell render. Then it renders a method, so we bring in the parentheses, and now we want to render what? Well, an H1. We would say H1 and an H1. We close it, and here we can say, this is our web app, exclamation mark. and we want to target what? Well, we want to do this to the app, so we do comma app, and so render is essentially a method that's taking two parameters here, what it is we're rendering and where do we want to render it. You can look at it that way…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.