🧸 Zustand and Tanstack Query #96
Reference in New Issue
Block a user
Delete Branch "zustand-react-query-navbar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What?
This PR introduces a new way of thinking about
client-stateandglobal state.To that end, I have begun switching from the
react-reduxstate management library to a more deliberate dichotomy:These two use cases have documented, well-researched and recommended approaches, which boils down to:
@tanstack/react-queryfor syncing with external data sourceszustandfor global state managementWhy?
Simply put, Redux relies on a lot of boilerplate, actions, reducers, dispatchers, action-types for every single piece of state that I want to surface in the UI. This grew untenable, and I refuse to write more code than I need to. I love deleting code, and this aligns well with that objective.
How?
To begin with, I have already introduced
react-queryandzustandin https://github.com/rishighan/threetwo/pull/95 and this PR will cover the refactor of the navbar and gradually move to other pages, in incremental PRs.