What is JSX in React Js

Creating Our First App in React.js 19

Follow these steps to create and run your first React 19 application.

๐Ÿ“Œ What is JSX in React.js?

JSX (JavaScript XML) is a syntax extension for JavaScript used in React. It allows developers to write HTML-like code within JavaScript files, making UI development more intuitive.

โœ” Example of JSX:

            
import React from 'react';

function Welcome() {
    return 

Hello, World!

; } export default Welcome;

โœ” Why Use JSX?

  • JSX makes code easier to read and write.
  • It allows embedding JavaScript expressions using curly braces { }.
  • JSX is compiled into JavaScript using Babel.
  • It enhances React's performance with optimizations.

๐Ÿ“Œ React Project Structure & Naming Convention

A well-structured project makes development easier and scalable. Hereโ€™s a recommended structure:

            
my-react-app/
โ”‚โ”€โ”€ public/           # Static files
โ”‚โ”€โ”€ src/              # Source code
โ”‚   โ”œโ”€โ”€ components/   # Reusable components
โ”‚   โ”œโ”€โ”€ pages/        # Page components
โ”‚   โ”œโ”€โ”€ hooks/        # Custom hooks
โ”‚   โ”œโ”€โ”€ context/      # Context API providers
โ”‚   โ”œโ”€โ”€ styles/       # CSS and Tailwind styles
โ”‚   โ”œโ”€โ”€ assets/       # Images and static assets
โ”‚   โ”œโ”€โ”€ App.jsx       # Root component
โ”‚   โ”œโ”€โ”€ main.jsx      # Entry point
โ”‚โ”€โ”€ package.json      # Project dependencies
โ”‚โ”€โ”€ vite.config.js    # Vite configuration
            
        

๐Ÿ“Œ Naming Conventions

  • Components: Use PascalCase (e.g., Header.jsx, Sidebar.jsx).
  • Hooks: Prefix with use (e.g., useAuth.js, useFetch.js).
  • Context: Use a descriptive name (e.g., AuthContext.js).
  • CSS Files: Use kebab-case (e.g., global-styles.css).
  • Images & Assets: Organize into subfolders (e.g., /assets/logos/).

๐Ÿ“Œ What to Learn Before React 19

Before diving into React 19, it is essential to understand the following technologies:

  • Basic HTML, CSS, and JavaScript
  • ES6+ Features (such as arrow functions, spread/rest operators, and async/await)
  • Fundamentals of Node.js and npm (Node Package Manager)
  • Basic understanding of Git and version control
  • Concepts of modular JavaScript and reusable components

๐Ÿš€ 5 Tips to Maximize Your React Course in 2025

To get the most out of your React learning experience, follow these tips:

  • Practice Daily: Build small projects regularly to reinforce your understanding.
  • Understand React Hooks: Learn hooks like useState, useEffect, and useContext thoroughly.
  • Explore State Management: Gain knowledge of Redux, Zustand, or the Context API.
  • Follow the Official Documentation: Always refer to the latest React documentation for updates.
  • Join the React Community: Participate in forums, GitHub discussions, and online coding groups.

โœ… Your First React 19 App is Ready!

Now, visit the localhost link shown in the terminal to see your first React 19 application in action.