/ React Native / Phase 4 Phase 4 Days 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.
Day 17: Fetch, Effects & Async State Machines
Mobile networking and request lifecycle
useEffect synchronization and cleanup
Idle, loading, success, empty, and error states Build the mental model for Idle, loading, success, empty, and error states Implement Idle, loading, success, empty, and error states in a small typed example Apply Idle, loading, success, empty, and error states to a realistic mobile product flow Debug the platform-specific failure modes of Idle, loading, success, empty, and error states
Abort, stale responses, retry, and connectivity changes Build the mental model for Abort, stale responses, retry, and connectivity changes Implement Abort, stale responses, retry, and connectivity changes in a small typed example Apply Abort, stale responses, retry, and connectivity changes to a realistic mobile product flow Debug the platform-specific failure modes of Abort, stale responses, retry, and connectivity changes
Day 18: Redux Toolkit from Scratch
Store, slice, reducer, action, dispatch, and selector mental model Build the mental model for Store, slice, reducer, action, dispatch, and selector mental model Implement Store, slice, reducer, action, dispatch, and selector mental model in a small typed example Apply Store, slice, reducer, action, dispatch, and selector mental model to a realistic mobile product flow Debug the platform-specific failure modes of 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
Day 19: Async Redux, API Caching & Optimistic UX
createAsyncThunk lifecycle and cancellation
RTK Query cache keys, invalidation, polling, and refetch Build the mental model for RTK Query cache keys, invalidation, polling, and refetch Implement RTK Query cache keys, invalidation, polling, and refetch in a small typed example Apply RTK Query cache keys, invalidation, polling, and refetch to a realistic mobile product flow Debug the platform-specific failure modes of RTK Query cache keys, invalidation, polling, and refetch
Optimistic updates with rollback
Authentication headers and error normalization
Day 20: Forms, Validation & Server Contracts
Schema-driven validation and typed form values
Field, form, and server error boundaries
Dependent selects, radios, switches, and date inputs Build the mental model for Dependent selects, radios, switches, and date inputs Implement Dependent selects, radios, switches, and date inputs in a small typed example Apply Dependent selects, radios, switches, and date inputs to a realistic mobile product flow Debug the platform-specific failure modes of Dependent selects, radios, switches, and date inputs
Draft preservation and duplicate-submit prevention
Day 21: Persistence & Offline Synchronization
Secure versus ordinary local storage
Persisted Redux boundaries and migrations
Offline mutation queue, retries, conflicts, and idempotency Build the mental model for Offline mutation queue, retries, conflicts, and idempotency Implement Offline mutation queue, retries, conflicts, and idempotency in a small typed example Apply Offline mutation queue, retries, conflicts, and idempotency to a realistic mobile product flow Debug the platform-specific failure modes of Offline mutation queue, retries, conflicts, and idempotency
Connectivity-aware UI and sync status
Day 22: Mini Project — Cooperative Pantry Ledger
Pantry items, household requests, typed forms, and durable drafts Build the mental model for Pantry items, household requests, typed forms, and durable drafts Implement Pantry items, household requests, typed forms, and durable drafts in a small typed example Apply Pantry items, household requests, typed forms, and durable drafts to a realistic mobile product flow Debug the platform-specific failure modes of Pantry items, household requests, typed forms, and durable drafts
Optimistic reservations, queued changes, and explicit sync truth
Redux Toolkit, cache policy, persistence migration, and conflict choice Build the mental model for Redux Toolkit, cache policy, persistence migration, and conflict choice Implement Redux Toolkit, cache policy, persistence migration, and conflict choice in a small typed example Apply Redux Toolkit, cache policy, persistence migration, and conflict choice to a realistic mobile product flow Debug the platform-specific failure modes of Redux Toolkit, cache policy, persistence migration, and conflict choice
Project requirements, constraints & review Build the mental model for Project constraints, data-loss tests, transfer rule, and reconciliation review Implement Project constraints, data-loss tests, transfer rule, and reconciliation review in a small typed example Apply Project constraints, data-loss tests, transfer rule, and reconciliation review to a realistic mobile product flow Debug the platform-specific failure modes of Project constraints, data-loss tests, transfer rule, and reconciliation review
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 itAfter 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.