Week 4 - React Fundamentals

Why React?

Setting up a React project with Vite

Components

JSX

Props

Rendering lists

Conditional rendering

The mental model: how React renders (2)

Practice

Assignment

Front end Track

Week 4 Overview

React is the most widely used JavaScript library for building user interfaces. Created by Facebook in 2013, it changed the way developers think about front-end development by introducing a component-based, declarative way of describing UIs. Instead of manually telling the browser how to update the DOM step by step, you tell React what the UI should look like for a given set of data β€” and React keeps the screen in sync for you.

This first week is all about getting comfortable with the basics. Before we make anything interactive (next week, with state and events), you first need a solid grasp of the building blocks: how React projects are set up, how to break a UI into reusable components, how JSX lets you write HTML-like markup inside JavaScript, and how data flows from one component to another through props. By the end of the week, you should be able to build a fully static multi-component website from scratch using nothing but components, JSX, props, and a little bit of conditional logic.

The mental shift is the most important part. Coming from vanilla JavaScript you are used to grabbing DOM nodes and updating them by hand. In React, you stop touching the DOM altogether β€” you describe the UI as a function of data, and React handles the rest. Once that "click" happens, everything else in this module will make sense.

<aside> πŸ’‘

React is just JavaScript. You aren’t learning a new language: they're learning a library that organizes JavaScript in a particular way. Every JS skill you already have (functions, arrays, destructuring, template literals, arrow functions, .map(), .filter()) is going to be used heavily.

</aside>

Learning goals

By the end of this week, you should be able to:


The HackYourFuture curriculum is licensed underΒ CC BY-NC-SA 4.0 *https://hackyourfuture.net/*

CC BY-NC-SA 4.0 Icons

Built with ❀️ by the HackYourFuture community · Thank you, contributors

Found a mistake or have a suggestion? Let us know in the feedback form.