Skip to content
Home Tutorials Roadmaps Courses
Log in Join free
Tutorials React What is React?
React Intermediate FREE

What is React?

Lesson 1 of 17 Intermediate Interactive

React is a JavaScript library for building user interfaces. It is maintained by Meta (Facebook).

React lets you build complex UIs from small, reusable pieces called components.

Key Concepts

  • Components — reusable UI pieces
  • JSX — JavaScript XML syntax
  • Virtual DOM — fast rendering
  • State & Props — data management

Syntax

REACT
function Welcome(props) {
    return <h1>Hello, {props.name}</h1>;
}

const root = ReactDOM.createRoot(
    document.getElementById('root')
);
root.render(<Welcome name="SukhNexus" />);
Your First React Component
REACT
import React from "react";

function App() {
    return (
        <div>
            <h1>Hello, React!</h1>
            <p>Welcome to SukhNexus Academy</p>
        </div>
    );
}

export default App;

Practice

1
Exercise

What is a component in React?

Answer
A reusable piece of UI that returns JSX.

Quick Quiz

1

What does JSX stand for?

JSX stands for JavaScript XML — a syntax extension for JavaScript.

Interview Questions

A lightweight copy of the real DOM that React uses to optimize updates by comparing changes before applying them.