Skip to content

Integrate Tanstack Query & Axios #668

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

Draft
wants to merge 3 commits into
base: react-rewrite
Choose a base branch
from
Draft

Integrate Tanstack Query & Axios #668

wants to merge 3 commits into from

Conversation

No767
Copy link
Member

@No767 No767 commented Jul 7, 2025

Summary

Traditionally, libraries such as Redux and Axios would be used for both state management and HTTP requests. This usually works, but only focuses on managing client-side state. Tanstack Query, on the otherhand, is an server-state management library, which also helps to reduce the code necessary to perform the same tasks with Redux. This seperates the concerns of our data into two parts: server-side and client-side. Tanstack Query handles the server-side operations and caching, such as calls to the API, and many others. While if we want to manage client-side states, then Redux will be used alongside Tanstack Query to efficiently manage that.

There were many considerations to make in terms of what HTTP client library to use. Fetch API, Ky, Axios, and others. Ultimately, Axios was chosen, mainly because it is based around the Promise API (in other words, it's basically just like aiohttp in the python world, and it is based on asyncio). This allows us to integrate it nicely with Tanstack Query, and in addition prevents us from blocking the main event loop with long, blocking HTTP calls.

This PR only sets the foundations, and integrates one or two API calls to use as reference in the future.

Types of changes

What types of changes does your code introduce to the UC Merced's ACM Chapter Website?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (Updates to README.md, the documentation, etc)
  • Other (if none of the other choices apply)

Checklist

Put an x in the boxes that apply

  • If code changes were made then they have been tested.
  • All workflows pass with my new changes
  • This PR does not address a duplicate issue or PR

@No767 No767 marked this pull request as draft July 7, 2025 14:05
Copy link

sonarqubecloud bot commented Aug 4, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant