Currently, API calls in the project use the native fetch API without centralized error handling or caching mechanisms. This can lead to inconsistent request management, lack of proper retries, and difficulties in handling errors across the application.
Proposal:
- Replace direct fetch calls with Axios to take advantage of its built-in error handling, interceptors, and request cancellation.
- Integrate React Query to manage API state efficiently, enabling automatic caching, background refetching, and better request deduplication.
- Standardize error handling across the app by using Axios interceptors.
- Implement global request and response transformation for better API consumption.
Currently, API calls in the project use the native fetch API without centralized error handling or caching mechanisms. This can lead to inconsistent request management, lack of proper retries, and difficulties in handling errors across the application.
Proposal: