Phase 4Days 17-22

Data, Redux & Offline-First State

Fetch, async lifecycles, Redux Toolkit, persistence, forms, cache, and synchronization

Phase Goal

Build honest data experiences that behave correctly during loading, failure, offline use, retries, and stale responses.

Progress

Day 17: Fetch, Effects & Async State Machines

Day 18: Redux Toolkit from Scratch

Day 19: Async Redux, API Caching & Optimistic UX

Day 20: Forms, Validation & Server Contracts

Day 21: Persistence & Offline Synchronization

Day 22: Mini Project — Cooperative Pantry Ledger

Capstone
Cooperative Pantry Ledger

Build an offline-first ledger for volunteers deciding how limited pantry stock should be reserved across household requests. Local drafts and reservations must survive restarts, duplicate retries must not double-decrement stock, and competing edits must produce a visible reconciliation choice.

  • Normalized Redux state and RTK Query cache boundaries for items, requests, and reservations
  • Durable mutation queue with idempotency keys, retry/backoff, migration, and honest local-versus-synced labels
  • Deterministic offline, restart, stale-response, duplicate-submit, and conflict test script
  • Transfer: support a server rule that partially fulfils a reservation instead of accepting or rejecting all of it

Phase Complete!

After this phase, you'll be able to:

  • Mobile networking and request lifecycle
  • useEffect synchronization and cleanup
  • Idle, loading, success, empty, and error states
  • Abort, stale responses, retry, and connectivity changes
  • Store, slice, reducer, action, dispatch, and selector mental model
  • Typed hooks and immutable update syntax
  • Local versus global versus server-state decisions
  • Normalized state and derived selectors

You can apply Phase 4 skills in a tested mobile project on Android and iOS.