The independent file on technology, travel & lifeFrom Pakistan, for everywhere
Huzi Blogs.
The ArchiveSectionsSearch

Planning a trip? HTG Travels — flights, visas, hotels & Umrah, handled properly.

WhatsApp +92 317 5054959
Huzi Blogs.

An independent file on technology, travel and life — long-form guides written plainly, from Pakistan, for everywhere.

ShopMeet the Creator

Sections

  • Travel
  • Technology
  • Lifestyle
  • Programming
  • Sports
  • Linux
  • All sections

The Desk

  • The Archive
  • Search the file
  • Disclaimer & Data Privacy Policy
  • A project of huzi.pk

© 2026 blogs.huzi.pk — All rights reserved.

Set in Playfair Display & Inter

    HomeWeb DevelopmentStory
    Web Development

    Getting Started with React 19: A Beginner's Guide for 2026

    H

    By Huzi

    File #192 · 3 min read

    You do not need a bootcamp, a degree, or a weekend of video courses to start React. You need one free evening, Node installed, and the willingness to ship something small. Tonight you can scaffold an app, write a component, make it interactive, and put it on the internet.

    The quick answer: Scaffold with Vite (create-react-app is long retired), write a component — a function that returns markup — make it interactive with useState, and deploy the dist folder tonight. One free evening, one live URL, every command below.

    Scaffold in two minutes

    The old create-react-app is long retired; Vite is where plain React apps begin now:

    npm create vite@latest my-first-app -- --template react
    cd my-first-app
    npm install
    npm run dev
    

    Open the local URL it prints (port 5173 by default). Edit a file, save, and the browser updates instantly — that hot reload is the feedback loop that teaches you fastest, so keep it running all evening.

    Your first component

    Delete the demo boilerplate in src and write this:

    function Greeting({ name }) {
      return <h1>Salam, {name}!</h1>;
    }
    
    export default Greeting;
    

    A component is just a function whose return value is markup. The argument is an object of props — here we pull name out directly in the parameter list — and the braces inside the markup embed any JavaScript expression, so the placeholder becomes whatever you pass in.

    Use it anywhere in your app as if it were a normal HTML tag, with the name as an attribute.

    Make it do something

    Interactivity needs state: a value the component remembers between renders. React hands you that with the useState hook:

    import { useState } from "react";
    
    function ChaiCounter() {
      const [cups, setCups] = useState(0);
      return (
        <button onClick={() => setCups(cups + 1)}>
          Chai ordered: {cups}
        </button>
      );
    }
    

    Read the hook line as: remember a number called cups starting at zero, and give me a setter to change it. Every click calls the setter, React re-renders, and the label updates. That loop — state in, markup out — is most of what a beginner writes for months, and it is genuinely the whole mental model.

    Ship it before bed

    One command bundles everything for production:

    npm run build
    

    The dist folder it creates is a plain static website. Drag it onto Netlify Drop, or run npx vercel in the project, and your first app has a real URL you can send someone tonight.

    The step The command What it does
    Scaffold npm create vite@latest my-first-app -- --template react Boots the project
    Install npm install Pulls the dependencies
    Dev server npm run dev Hot reload on port 5173
    Production npm run build Bundles everything into dist
    Deploy Netlify Drop or npx vercel Gives the app a real URL

    Shipping small applies to travel too: one booked weekend beats the hypothetical world tour. When you are ready to ship a trip the way you shipped the app, HTG Travels runs the file end to end.

    Pro tip: Push the project to GitHub too, then deploy three or four tiny things, each with a live link — a junior portfolio of small deployed apps carries further than any certificate.

    If your first component feels clumsy tonight, spare a thought for the beginners of Gaza, who have lost laptops, homes and semesters and keep starting again anyway — the bravest first commits I know of.

    Your first trip abroad deserves the same patience as your first app. For first-time flyers, HTG Travels runs the whole Dubai and Gulf ticketing file — visa paperwork, seat, the printouts nobody warns you about — so the first stamp in your passport arrives without panic. Message +92 317 5054959 for a visa run done between sprints.

    Presented by

    HTG Travels — Plan the Trip, Skip the Runaround

    Flights, visas, Umrah packages and Hunza–Skardu tours, handled end to end from our licensed Sialkot desk. Real fares, hotel names in writing, and a human who answers — before you pay a rupee.

    Flights & rebooking Visa files Umrah 2026–27 Northern tours
    Visit huzi.pkWhatsApp +92 317 5054959

    Sialkot, Pakistan · Licensed agency · Fast quotes on WhatsApp


    You Might Also Like

    Trendy All-Over Digital Print Lawn 3-Pc Suit with Matching Lawn Dupatta (Casual)

    Trendy All-Over Digital Print Lawn 3-Pc Suit with Matching Lawn Dupatta (Casual)

    PKR 4250

    Luxury Heavy Schiffli Embroidered Lawn Party Dress 3-Pc | Digital Print Silk Dupatta (2025)

    Luxury Heavy Schiffli Embroidered Lawn Party Dress 3-Pc | Digital Print Silk Dupatta (2025)

    PKR 5650

    Deep-Red Chiffon Wedding Dress – Emb Suit + Emb Silk Trouser

    Deep-Red Chiffon Wedding Dress – Emb Suit + Emb Silk Trouser

    PKR 7300

    Handwork Heavy Embroidered Black Chiffon Suit | Organza Dupatta

    Handwork Heavy Embroidered Black Chiffon Suit | Organza Dupatta

    PKR 5900

    Sequins Embroidered Lawn Suit 3-Pc | Printed Soft Chiffon Dupatta (Summer 2025)

    Sequins Embroidered Lawn Suit 3-Pc | Printed Soft Chiffon Dupatta (Summer 2025)

    PKR 4800

    Keep reading

    Related files

    Web Development
    English

    Vite + React Performance 2026: The Complete Problem-Solving Guide

    Measure the three Core Web Vitals, split routes and vendor chunks, tree-shake the imports that eat your bundle, let the React Compiler do the memo work, and fix images before JavaScript.

    By HuziFile #542

    Read
    Web Development
    English

    Next.js 16 Server Actions: The Complete 2026 Problem-Solving Guide

    The Server Actions deep end: one function wired straight to your form, useActionState for errors and pending flags, revalidatePath vs revalidateTag, and the security rules people learn too late.

    By HuziFile #529

    Read
    Web Development
    English

    API Gateway Patterns 2026: The Complete Problem-Solving Guide

    The five jobs a gateway actually does — routing, auth offload, rate limiting, transformation, aggregation — with Kong YAML you can run tonight and the two failure modes that burn teams in production.

    By HuziFile #546

    Read
    Web Development
    English

    WebSockets Real-Time Apps 2026: The Complete Problem-Solving Guide

    The production side of WebSockets: sticky sessions versus the Redis adapter, backpressure from slow clients, heartbeats, honest reconnection and delivery guarantees past a single node.

    By HuziFile #540

    Read
    Web Development
    English

    GraphQL vs REST API Design 2026: The Complete Problem-Solving Guide

    The honest decision guide for 2026: when REST wins, when GraphQL wins, what each one costs you in caching, security and operations, and how to migrate screen by screen without a rewrite.

    By HuziFile #539

    Read
    Web Development
    English

    Web Dev Frameworks in 2026: Next.js 16 vs Astro 5 vs SvelteKit 2 vs Remix

    The 2026 framework verdict without the hype: Next.js 16 for applications, Astro 5 for content, SvelteKit 2 for performance, Remix merged into React Router v7 — with hosting costs in rupees.

    By HuziFile #511

    Read
    Back to the archive