Course home
FSWD · MERN STACK UNIT 3 / 5
3UNIT

FSWD · MERN Stack · The first letter lights up

The site becomes an app. React.

Remember rendering twenty menu items by hand in Lab 5? This unit is the answer to that exact frustration. Components, JSX, props, state, lifecycle, and routing — Poshtik Campus rebuilt the way modern product teams actually build.

M · MongoDB E · Express R · React N · Node LETTER 1 OF 4 — R STARTS TODAY. E + N + M LAND IN UNIT 4.
ComponentsUIs built from pieces
Props & Statedata in, change over time
Routingone page, many views
8Classroom sessions · 60 min each
2Labs · 120 min each
15Exam-style questions solved along the way

Your 10 sessions, in order

Four classes teach it.
Then one lab rebuilds your project with it.

Same rhythm, new territory. This unit opens with folder fork #1 — React needs its own build tools, so a genuinely new poshtik-campus-react/ project is created (and Class 21 explains exactly why the old folder can't just absorb it). Your Unit-1/2 site stays finished and untouched.

Round 1

From manual DOM work to components

21CLASS Why React, the Fork & Your First JSX

Lab 5's Build-It-Twice reflection gets its answer. What React actually is, why it needs its own project, Node + npm verified, npm create vite@latest poshtik-campus-react run for real, and your first look at JSX.

Folder fork #1 — explained first 2 exam questions solved
SOON
22CLASS Templating with JSX, Babel & ES6 Literals

What Babel does behind the scenes, embedding expressions with { }, your Unit-2 template literals inside JSX — and the one-root-element rule, shown breaking first, then fixed with fragments.

HTML-in-JS, demystified
SOON
23CLASS JSX Attributes & Styling React Elements

className (and why it isn't class), inline style objects, conditional styling — the username-in-blue exam question answered exactly as the paper asks it.

Styled from code Exam question solved
SOON
24CLASS React Components & Stateless Components

The idea the whole unit stands on: a component is a function that returns JSX. Your first DishCard, the component-tree sketch habit begins, and composing a page out of pieces.

DishCard is born
SOON
LABSIX Poshtik Campus, Rebuilt as Components

The static rebuild: Header, Hero, DishCard and Footer components assembled into the familiar menu page — same look as your Unit-1 site, entirely new architecture underneath. Two component-building exam questions worked in full.

Same site, new bones 2 exam questions solved
SOON
Round 2

Data flows, state changes, routes appear

25CLASS Props

One DishCard, twenty dishes — props are how each card knows which dish it shows. Passing data parent-to-child, props are read-only, and the age=21 exam question solved on the spot.

Data flows down 2 exam questions solved
SOON
26CLASS State

Props come from outside; state lives inside. useState, the cart counter that finally updates itself, and the state-vs-props comparison the exam loves to ask.

The UI updates itself 2 exam questions solved
SOON
27CLASS Component Lifecycle & Event Handling in React

Mount, update, unmount — taught in the exam's own class-component vocabulary first, then the same three moments the modern way with useEffect. React events vs the raw addEventListener you know from Unit 2.

Both styles, exam-safe 4 exam questions solved
SOON
28CLASS Rendering Lists, Error Handling, Routers & SPAs

poshtikMenu.map() in JSX — the twenty-dish payoff, keys and why they matter, error boundaries at survey depth, and react-router-dom turning your pages into routes of a single-page app.

One app, many views Exam question solved
SOON
LABSEVEN The Complete React SPA

The unit's finale: Home, Menu and Order as real routes, the full bilingual menu rendered from data, a working cart in state — Poshtik Campus is now a genuine single-page application, plus the three-route SPA exam question worked in full.

A real app ships Exam question solved
SOON

The running project · folder fork #1

Same campus. New engine room.

Poshtik Campus పౌష్టిక్ క్యాంపస్ · poshtik-campus-react/ begins

"Your HTML/CSS/JS folder is done growing — and that's a graduation, not an abandonment." React needs its own build tool-chain (Vite), so Class 21 starts a genuinely new project — after explaining exactly why the old folder can't just absorb it. Every dish, every Telugu name, every photo carries forward.

The data is the continuity: the same bilingual poshtikMenu you built in Class 17 becomes the array your components map over, and the same dish photographs from your Unit-1 images/ folder move into the new project's assets. By Lab 7, the site you've been growing since Lab 1 exists twice — once as the finished static original, once as a living single-page app.

What ships in your project this unit
  • poshtik-campus-react/ — a real Vite project, created live in Class 21, growing through both labs
  • A component library of your own — Header, Hero, DishCard, Footer (Lab 6), then routed pages and a stateful cart (Lab 7)
  • The full bilingual menu rendered from poshtikMenu data — no dish hand-written twice, ever again
  • Commit-and-push discipline continues — the new repo gets the same habit from its first commit
poshtik-campus-react · the component tree by Lab 7
<App />
<Header /> <Routes /> <Footer />
<Home /> <Menu /> <Order />
<DishCard /> × 20 — one per dish, via .map()
Click a route above — watch React light only the components that route needs.

The component-tree sketch becomes a habit this unit — and this is why: change the route, and only part of the tree re-renders. You'll draw this shape yourself before writing any JSX.