Project Setup
Welcome to Module 2! In this module, we will dive into Frontend Development using React and TanStack Router.
Learning Objectives
Section titled “Learning Objectives”By the end of this module, you will be able to:
- Set up a modern React project with Vite
- Understand React components and props
- Implement client-side routing with TanStack Router
Task Manager
Section titled “Task Manager”We will be building the frontend for our Task Manager application. We’ll use Vite for a fast development environment and React as our UI library.
Scaffolding the Project
Section titled “Scaffolding the Project”We will create a new React project using Vite.
-
Open your terminal and navigate to your projects folder.
-
Run the create command:
Terminal window bun create vite task-manager --template react-ts -
Navigate into the project directory:
Terminal window cd task-manager -
Install dependencies:
Terminal window bun install -
Start the development server:
Terminal window bun run dev
You should now see your React app running at http://localhost:5173!
Project Structure
Section titled “Project Structure”Here is a quick look at the structure of the project we just created:
Directorysrc
Directoryassets/
- …
- App.tsx The main component
- main.tsx The entry point
- index.css
- vite-env.d.ts
- index.html
- package.json
- tsconfig.json
- vite.config.ts
In the next section, we will explore the fundamentals of React.