Setting up the Environment for our Quiz App
Welcome to the build-along module! In this section, you’ll build the complete Quiz App using React. We’ll walk through environment setup, file and folder structure, components, state management, data fetching, and styling.
By the end, you’ll have a fully working, styled quiz app that fetches trivia questions from an API and displays results.
Setting up the Environment…
Step 1: Install Node.js
Go to nodejs.org and download the LTS version. Install it.
Step 2: Create the App Using Vite
In your terminal, run:
npm create vite@latest quiz-app -- --template react
cd quiz-app
npm install
This sets up a minimal React + Vite project.
Step 3: Start the Dev Server
npm run dev
Open the provided localhost URL (usually http://localhost:5173) to view your app.


