React.js for Beginners
Full Stack React.js ⏱ Read time • calculating…

React.js for Beginners – Friendly Step-by-Step Guide

Author Avatar
By: Sajid A. Rabby
🗓️ Nov 16, 2025 • 0 words

1️⃣ What Is React.js and Why Should You Learn It?

React.js is a JavaScript library created by Facebook for building fast, interactive user interfaces (UI), especially for Single Page Applications (SPA). Instead of reloading the whole page every time, React updates only the parts of the screen that need to change.

If you want to become a modern Frontend or Full Stack Developer, React is one of the best skills you can learn. It’s used by companies like Facebook, Instagram, Netflix, Uber, Airbnb and thousands of others.

Good news: You don’t need to be a “JavaScript master” to start React. But you do need solid JavaScript basics (variables, functions, arrays, objects, ES6).

2️⃣ Prerequisites Before Starting React

Before jumping into React, make sure you are comfortable with:

If you’re not confident in JavaScript yet, spend 2–3 weeks building small JS projects (to-do list, calculator, simple API fetch) before starting React. It will make your React journey much easier.

3️⃣ How React Works – The Core Ideas

React is built around a few simple but powerful ideas:

  1. Components – Your UI is broken into small, reusable pieces.
  2. JSX – You write HTML-like syntax inside JavaScript.
  3. Props – Data you pass into components.
  4. State – Data that can change over time (and re-renders the UI).
  5. Hooks – Functions like useState and useEffect that add power to functional components.

🔹 Components

A component is just a JavaScript function that returns JSX (UI).

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

🔹 JSX

JSX looks like HTML but is actually JavaScript syntax. You can embed variables and expressions inside:

const name = "Sajid";

function Welcome() {
  return <h1>Welcome, {name}!</h1>;
}

🔹 Props (Component Inputs)

Props are used to pass data from parent to child components:

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

// Usage:
<Welcome name="Rabby" />

🔹 State (Dynamic Data)

State is data that can change over time inside a component. When state changes, React re-renders that part of the UI.

import { useState } from "react";

function Counter() {
  const [count, setCount] = useState(0);

  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>
        Click me
      </button>
    </div>
  );
}

4️⃣ Setting Up Your First React Project

There are many ways to start a React project. Today, Vite is one of the fastest and simplest ways.

Option 1 – Using Vite (Recommended)

  1. Install Node.js (LTS version) from the official website.
  2. Open your terminal / CMD.
  3. Run these commands:
npm create vite@latest my-react-app -- --template react
cd my-react-app
npm install
npm run dev

Then open the URL shown in the terminal (usually http://localhost:5173).

Project Structure (Common Files)

5️⃣ Thinking in Components – A Simple Example

Let’s say you want to build a small “Skills” section for your portfolio. You can break it into:

// SkillItem.jsx
function SkillItem({ name, level }) {
  return (
    <li>
      <strong>{name}</strong> – {level}
    </li>
  );
}

export default SkillItem;
// SkillList.jsx
import SkillItem from "./SkillItem";

function SkillList() {
  const skills = [
    { name: "HTML", level: "Strong" },
    { name: "CSS", level: "Good" },
    { name: "React", level: "Learning" },
  ];

  return (
    <ul>
      {skills.map((skill) => (
        <SkillItem
          key={skill.name}
          name={skill.name}
          level={skill.level}
        />
      ))}
    </ul>
  );
}

export default SkillList;
// App.jsx
import SkillList from "./SkillList";

function App() {
  return (
    <div>
      <h1>My Skills</h1>
      <SkillList />
    </div>
  );
}

export default App;

6️⃣ React Hooks – The Essentials for Beginners

Hooks let you “hook into” React features from function components. As a beginner, focus on these two:

useState – Manage Local State

You already saw useState in the counter example. Use it for:

useEffect – Side Effects

useEffect runs code when something changes (or when the component loads). For example, fetching data from an API:

import { useEffect, useState } from "react";

function Users() {
  const [users, setUsers] = useState([]);

  useEffect(() => {
    fetch("https://jsonplaceholder.typicode.com/users")
      .then((res) => res.json())
      .then((data) => setUsers(data));
  }, []); // empty array = run once

  return (
    <ul>
      {users.map(user => <li key={user.id}>{user.name}</li>)}
    </ul>
  );
}

7️⃣ Common Beginner Mistakes (and How to Avoid Them)

8️⃣ Simple Practice Roadmap (30 Days)

Here’s a simple 4-week plan you can follow:

  1. Week 1: Basics – components, JSX, props, useState (build small UI pieces)
  2. Week 2: Lists, conditional rendering, handling events (to-do list, counter, filters)
  3. Week 3: useEffect, API calls (simple dashboards using free APIs)
  4. Week 4: Small project – a portfolio, notes app, or simple blog frontend
Real talk: Your first React project will feel messy. That’s normal. The goal is not perfection. The goal is to finish, learn, and then improve in the next project.

9️⃣ What to Learn After React Basics

Once you are comfortable with React fundamentals, you can explore:

✅ Final Thoughts

React is not something you “understand in one weekend”. But with consistent practice, small projects, and patience, it becomes enjoyable and powerful.

If you already know HTML, CSS, and JavaScript, React is your next big step towards becoming a serious Frontend or Full Stack Developer.

Start small, keep building, and don’t be afraid to break things while learning.

Back to Blog