Skip to content

dante690dark/part2-Rendering-a-collection-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

65 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

part2-Rendering-a-collection-modules

This section is part of the Full Stack OpenοΏΌ course. In Part 2οΏΌ, the focus is on building more dynamic React applications.

πŸ“š We learned how to render lists using the map() function, handle user input with HTML forms, use the useEffect hook for data fetching, and apply basic styling with CSS.

βΈ»

πŸ“ Projects Included

  1. Countries

Displays country data and allows users to explore information dynamically.

  1. Courseinfo

Renders course information and exercises using reusable components.

  1. Phonebook

A CRUD-style app that allows adding, deleting, and filtering contacts. This project includes a fake backend using db.json.

βΈ»

πŸš€ Getting Started

Each project is independent. Navigate into the desired folder:

bash

cd countries
# or
cd courseinfo
# or
cd phonebook

Install dependencies

bash

npm install

Run the app with:

bash

npm run dev

πŸ—„οΈ Fake Backend (Phonebook Only)

The phonebook project uses a fake REST API powered by JSON Server.

Important:

β€’ db.json is only used by the phonebook project

β€’ The backend must be running to add, delete, or update contacts

Run the backend server

bash

cd phonebook
npm run server

The API will be available at:

code

http://localhost:3001

πŸ“ Example Structure

root/
β”œβ”€β”€ countries/
β”œβ”€β”€ courseinfo/
└── phonebook/
    β”œβ”€β”€ db.json
    β”œβ”€β”€ src/
    └── package.json

⚠️ API Key Required:

For Countries project fetches weather data from an external API. You must subscribe at least to the free plan (version 3.0), which has a very limited number of requests, for more requests yo can explore others plans

Setup Example:

Create a .env file inside the countries folder:

VITE_SOME_KEY=your_api_key_here

and you can export it from the code just like this

code

const api_key = import.meta.env.VITE_SOME_KEY

About

This is the part 2 of "full stack open" course

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors