Repository navigation
06 State Management
Vicky Patel edited this page Nov 19, 2026
·
2 revisions
HEMA implements lightweight, high-performance state management using native React 19 Context.
-
Store:
src/context/DonorContext.jsx -
Hook:
useDonors() -
Exported State:
-
donors: Array of all donor entities. Each entity carries a booleanrequestedfield tracking request status in the active session. -
loading: Boolean loading flag indicating initial data fetching. -
requestDonor(id): Action dispatcher updating the targeted donor'srequestedfield totrueand triggering an alert toast.
-
Note
Network fetch failures are caught and surfaced directly through an error notification toast (addToast) without setting an unhandled global crash boundary.
| 🏛️ Project Hub | 🛠️ Developer Docs | 💬 Community & Support |
|---|---|---|
| GitHub Repository | System Architecture | GitHub Discussions |
| Contributing Guide | Design System | Open Issues |
| Production Deployment | State Management | Pull Requests |
| Project Roadmap | Testing & QA Matrix | Maintainer Runbook |