From the course: Build Modern Web Apps with React, Hooks, State Management, and APIs Using Vite or Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Syntax, embedding expressions, attributes, children

Syntax, embedding expressions, attributes, children

Hi, and welcome to module number 2 of this course. In this module, we'll learn about React's fundamentals and core concepts. Let's start module number 2 with lesson number 1. In this lesson, we'll learn about what JSX is, why we use it, and we deep dive into JSX code. JSX is JavaScript XML. As I told you in the previous module that React uses JavaScript for building the UI. So in order for working HTML as part of JavaScript code, React created a JavaScript XML. It's a syntax expression for JavaScript. You have to be just familiar with HTML so that you can write code using JavaScript. You don't have to worry about learning any other language. It looks exactly like HTML but it has the full capacity of using JavaScript. Behind the scene, React classes uses react.createElement to create a JSX element on the screen. This is a sample JavaScript JSX looks like. Let's see that in action. From the module number 1, you remember this application. In this application, we created a react sample…

Contents