-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Summary
Multiple components independently fetch the same data from the blockchain:
- Stats.tsx: Fetches all proposals to calculate statistics
- ProposalList.tsx: Fetches all proposals to display them
- UserDashboard.tsx: Fetches all proposals to find user's proposals
This means the same data is fetched 3 times on page load.
Recommended Fix
- Create a shared data fetching layer that caches results
- Use React Query or SWR for automatic caching and deduplication
- Fetch data once at the top level and pass down via context
- Implement a refresh strategy that updates all consumers
Impact
High - Tripling API calls wastes bandwidth, increases latency, and risks rate limiting.
Reactions are currently unavailable