Huzi Blogs
BlogCategories
BlogCategories
Disclaimer & Data Privacy Policy
Project by huzi.pk

© 2026 blogs.huzi.pk. All Rights Reserved.

    Back to all posts
    Web Development

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

    By Huzi

    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.

    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. Push the project to GitHub too — three or four tiny deployed things, each with a live link, will carry a junior portfolio 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, we at HTG Travels run 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. Learn one new thing at a time; we will hold the other end.

    Advertisements


    You Might Also Like

    All-Over Print Embroidered Lawn Suit 3-Pc | Printed Soft Chiffon Dupatta (2025)

    All-Over Print Embroidered Lawn Suit 3-Pc | Printed Soft Chiffon Dupatta (2025)

    PKR 4600

    Printed & Embroidered Lawn 3-Pc Suit with Printed Chiffon Dupatta | Unstitched Pakistan

    Printed & Embroidered Lawn 3-Pc Suit with Printed Chiffon Dupatta | Unstitched Pakistan

    PKR 4300

    Elegant Embroidered Swiss Lawn Dress 3-Pc | Digital Print Silk Dupatta (2024)

    Elegant Embroidered Swiss Lawn Dress 3-Pc | Digital Print Silk Dupatta (2024)

    PKR 4850

    Mustard Dhanak Winter Dress – Heavy Embroidery, Digital Shawl, Formal

    Mustard Dhanak Winter Dress – Heavy Embroidery, Digital Shawl, Formal

    PKR 5600

    All-Over Print Embroidered Lawn Suit 3-Pc (2025) | 4-Side Embroidered Chiffon Dupatta

    All-Over Print Embroidered Lawn Suit 3-Pc (2025) | 4-Side Embroidered Chiffon Dupatta

    PKR 4900

    Advertisements


    Related Posts

    Web Development
    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 Huzi

    Read More
    Web Development
    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 Huzi

    Read More
    Web Development
    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 Huzi

    Read More
    Web Development
    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 Huzi

    Read More
    Web Development
    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 Huzi

    Read More
    Web Development
    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 Huzi

    Read More