Task 11: Remove direct API calls from components
This commit is contained in:
@@ -239,6 +239,8 @@ Reference: `Docs/Refactoring.md` for full analysis of each issue.
|
||||
|
||||
**Docs changes needed:** None. This task brings the code into conformance with the documented rules ("Components receive data via props only — they never call the API directly").
|
||||
|
||||
**Status:** Completed.
|
||||
|
||||
**Why this is needed:** Components that call the API directly are impossible to unit-test without mocking the network, cannot be reused with alternate data sources, and violate the layered architecture. The hook layer exists precisely to own data fetching so that the component layer stays declarative and testable.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user