React Basics · Lesson 1 of 6

Why React exists, and your first running app

Understand the problem React solves, check your prerequisites honestly, and get a React app running locally.

Data This lesson: 122KB

First, the honest gate: this course assumes JavaScript Basics — variables, functions, arrays of objects, the DOM, fetch. If those are shaky, do that course first; React on weak JavaScript is memorising incantations, and it is the single most common way self-taught learners get stuck.

Now the problem React solves. In plain JavaScript you fetched data and hand-built DOM elements to show it. That works at small scale and collapses at real scale: an app like a food-delivery panel shows the same data in six places, and when an order's status changes, every place must be found and updated by hand — miss one and the screen lies. React's deal is: describe what the screen SHOULD look like for any given data, and React updates the actual DOM whenever the data changes. You stop writing 'find the element and change it' and start writing 'this is what this data looks like on screen'. Data changes; screen follows; automatically.

Why this course, commercially: React appeared by name in our 100-employer research (NETSOL, among others), it is the R in MERN — the stack the growing Lahore/Karachi software houses hire juniors into — and it is the most transferable front-end skill: React Native (mobile) and most modern dashboards build on the same ideas.

Setup, the current standard way: install Node.js (nodejs.org, LTS version — you met Node's name in JavaScript Basics; here it just runs the build tools), then in a terminal: npm create vite@latest my-app -- --template react, then cd my-app, npm install, npm run dev. A local address appears (localhost:5173); open it and a starter page renders. Two things to notice immediately: the files live in src/ and the one you will edit all course is App.jsx; and saving a file updates the browser instantly — that live loop is your console-equivalent from JavaScript Basics. If npm feels alien, run the commands anyway and read what they print; the paid course explains the tooling properly, and using it before understanding it is how everyone starts.

Try it yourself

Get the app running: install Node LTS, create the Vite React app, npm run dev, open localhost. Then edit App.jsx — change the visible text to your name and save — and watch the browser update itself. If any step fails, read the terminal's actual error message before searching; half the time it names the fix.

Check what you learned

Create your free BvLogic ID to take the quiz and record your score.

Create your BvLogic ID
Continue to lesson 2 All lessons