Lesson 1/100

Tutorials React.js Tutorial

Introduction to React — Complete Guide

Introduction to React — Complete Guide: free step-by-step lesson with examples, common mistakes, and interview tips — part of React.js Tutorial on Toolliyo Academy.

On this page

React.js Tutorial · Lesson 1 of 100

Introduction to React

BeginnerIntermediateAdvancedProfessional

Beginner · 1 — Learn by example · ~6 min · Module 1: React Basics & Setup

What is this?

React is a free JavaScript library for building the parts of a website people see and click — login screens, menus, product lists, and dashboards. You write small building blocks called components. When data changes (a new message, a button click, a form value), React updates the screen for you.

Why should you care?

Without React, developers hunt through HTML with JavaScript and change each piece by hand. That works for tiny pages but breaks on real apps. React gives you one clear way to say “this is what the screen should look like now,” and it handles the messy DOM work.

See it live — copy this example

Paste into src/App.jsx (or the file noted in the steps). Save and watch the browser update.

import { createRoot } from 'react-dom/client';

function Hello() {
  return <h1>Hello, React!</h1>;
}

createRoot(document.getElementById('root')).render(<Hello />);

Run Example »

Edit the code and click Run to see the result update live.

Code
Result

What happened?

  • Hello is a component — just a function that returns what you want on screen.
  • createRoot finds the empty div in index.html and puts your component there.
  • When you edit Hello and save, the browser updates automatically during development.

Try it yourself

  1. Install Node.js from nodejs.org (LTS version is fine).
  2. Open a terminal and run: npm create vite@latest my-app -- --template react
  3. Then: cd my-app → npm install → npm run dev
  4. Change text or labels in the example and save — watch the browser update.
  5. Break the code on purpose (remove a bracket), read the error message, then fix it.

Remember

React builds the UI with components. You describe the screen; React updates it when data changes. Start with Vite — it is the easiest way to run React on your machine.

Questions on this lesson 0

Sign in to ask a question or upvote helpful answers.

No questions yet — be the first to ask!

React.js Tutorial
Course syllabus

React.js Tutorial

Module 1: React Basics & Setup
Module 2: Props, Events & Lists
Module 3: Forms & Hooks
Module 4: Routing & Data
Module 5: State & Authentication
Module 6: Architecture & React 19
Module 7: Performance
Module 8: Full-Stack & Real-Time
Module 9: Testing & Deployment
Module 10: ShopCart Projects
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details