Skip to content

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

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