Troubleshooting
Common issues and solutions
Troubleshooting
Queries Not Updating
Symptom: Query data doesn't update when expected.
Solutions:
- Check query key stability:
- Verify cache invalidation:
- Check observer subscription:
Memory Leaks
Symptom: Application memory grows over time.
Solutions:
- Unsubscribe from queries:
- Enable garbage collection:
- Monitor observer count:
Network Errors
Symptom: Fetch requests fail repeatedly.
Solutions:
- Check retry configuration:
- Implement error handling:
- Use error boundaries in React:
Type Errors
Symptom: TypeScript compilation errors.
Solutions:
- Ensure query keys are typed:
- Use generic types:
- Check import paths:
Performance Issues
Symptom: Application feels slow.
Solutions:
- Increase stale time:
- Use background refetching:
- Monitor metrics: