Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Full Stack Open · Part 6 — State Management (6.1–6.22)

Repositori d'entrega de la Part 6 del curs Full Stack Open (Universitat de Hèlsinki). Gestió d'estat amb Zustand, TanStack Query i Context API.

Usuari del curs: Dani (CinematicEnciclopedia).

Contingut

Carpeta Exercicis App Gestor d'estat
unicafe/ 6.1 Recompte d'estats (Unicafe) Zustand
anecdotes/ 6.2–6.15 Anecdotes (vots + backend JSON Server) Zustand + Fetch
query-anecdotes/ 6.16–6.22 Anecdotes (vots + servidor propi) TanStack Query + Context API

Validació final: 17/17 tests PASS · lint PASS · build PASS.

Com executar cada app

Cada carpeta és un projecte Vite independent. En una carpeta qualsevol:

npm install
npm run dev        # app (Vite, per defecte http://localhost:5173)

Per a les apps que depenen d'un backend (anecdotes i query-anecdotes), cal arrencar-lo en una segona terminal:

# dins de anecdotes/
npm run server     # JSON Server (json-server -p 3001 db.json)

# dins de query-anecdotes/
npm run server     # node server.js (port 3001)

Test, lint i build

npm test           # Vitest (run)
npm run test:watch # Vitest (watch)
npm run lint       # ESLint
npm run build      # Vite build

Estat concret per carpeta

  • unicafe/ — 6.1: Unicafe amb estat centralitzat a Zustand. Test: 3/3.
  • anecdotes/ — 6.2–6.15: vots amb accions asíncrones, noficacions (7), filtre (6), backend JSON Server amb db.json (seed oficial de l'enunciat), delete a 0 vots (9). Tests: 9/9 (5 UI + 4 de store).
  • query-anecdotes/ — 6.16–6.22: pages d'error/loading (24), crear (17), vots amb mutations (18), notifications amb Context API (22). Servidor propi (server.js) amb validació d'anecdote ≥ 5 caràcters. Tests: 5/5.

Enllaços

Nota: la numeració real de la Part 6 del traç vigent és 6.1–6.22. part6d.md (Redux) és referència històrica i no s'inclou.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages