Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE]: Cache api requests and properly handle loading and error states for all api requests #850

Open
1 task done
khaledosman opened this issue Feb 12, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request frontend

Comments

@khaledosman
Copy link
Contributor

Motivation

Our current codebase doesn't really handle loading and error states for all api requests, it also makes redundant/unnecessary api calls when switching between views or tabs every time leading to a less optimal user experience.

Acceptance Criteria:

  1. Each composable for making api requests should probably return loading and error states to be used in the ui to properly show the state.
  2. Eliminate random setTimeout calls that predict when a response will be received
  3. Cache api requests to avoid redundant requests
  4. Using something like https://github.com/TanStack/query/ could also avoid the need for over-reliance on the pinia store and handle our requests in a better way with built in polling/refetchQueries, etc.. instead of having to make follow up api requests manually after adding something to update the UI

Alternatives

Vanilla Implementation
Using tanstack/query or similar implementations

Contribution

No response

Have you searched for similar issues before submitting this one?

  • Yes, I have searched for similar issues
@khaledosman khaledosman added the enhancement New feature or request label Feb 12, 2025
@khaledosman khaledosman self-assigned this Feb 12, 2025
@khaledosman khaledosman changed the title [FEATURE]: Cache api requests and properly handling loading and error states for all api requests [FEATURE]: Cache api requests and properly handle loading and error states for all api requests Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

No branches or pull requests

1 participant