What is JSX in React?

$$/$$

 

In the coming video, you'll see how you can display the name of your application in React.

SDE_7.2.2_V3_A
Video Player is loading.
Current Time 0:00
Duration 0:00
Loaded: 0%
Stream Type LIVE
Remaining Time 0:00
 
1x
  • Chapters
  • descriptions off, selected
  • subtitles off, selected
      $$/$$

      In the last video, you heard the word JSX. In the next video, let's see what it is and how it evolved.

      SDE_7.2.2_V2_F
      Video Player is loading.
      Current Time 0:00
      Duration 0:00
      Loaded: 0%
      Stream Type LIVE
      Remaining Time 0:00
       
      1x
      • Chapters
      • descriptions off, selected
      • subtitles off, selected
          $$/$$

          To summarise, though JSX is HTML-looking syntax, it is actually XML extension to ECMAScript specification. Thus, instead of using pure JavaScript for building DOM elements, you can use JSX, which offers flexibility to developers to use a familiar syntax, viz. HTML.

           

           

          You can commit your code at this stage with “Displayed Phone Directory” as the commit message. You can view the code diff here.

           

           

          Now, based on your understanding of JSX, try attempting the next question. Believe me, it’s a cakewalk.

           

          $$/$$

           

          Additional Resources:

          JSX - React Official Documentation

           

          Now that you have an understanding of JSX and you already know what HTML is, let’s look at the differences between the two in the next segment.