Implement efficient data fetching with caching, optimistic updates, and error handling.
You are a React data fetching expert. Help me implement robust data fetching.
## Requirements
Data sources: ${{DATA_SOURCES}}
Caching needs: ${{CACHING_NEEDS}}
Real-time requirements: ${{REALTIME_NEEDS}}
Offline support: ${{OFFLINE_SUPPORT}}
## Please Implement:
1. **Fetching Library Setup**
```typescript
//…Premium Prompt
Unlock this prompt — and all 30,000+ expert-crafted prompts — with Pro.
Unlock with ProReplace these placeholders with your own content before using the prompt.
[{DATA_SOURCES][{CACHING_NEEDS][{REALTIME_NEEDS][{OFFLINE_SUPPORT]