Open billychen0894 opened 8 months ago
Used in the following routes: /[productId], /cart, /success, /user/*
Used in the following routes: /[productId], /user/*
Used in the following routes: /admin/*
The above states and actions managed by Redux will be migrated to Zustand and React Query. Zustand is lightweight and simple, and it is much more performant and less boilerplates than Redux. For any server states that require making requests to the server will be handled by React Query, which it provides caching and background update. In this case, cartStore will be managed by Zustand, and userStore & adminStore will be managed by React Query.
The app is fully migrated from Redux to Zustand, as most states are coming from server-side being handled by server actions; therefore, it's overskill by using Redux. Zustand is currently handling the cart states across the app.
Related commits
Overview
Implementation Checklist
Disclaimer
This issue is used for tracking purposes and to document the progress and improvements made to the project. It will remain open to allow easy access and visibility of the ongoing enhancements/refactoring efforts. Comments in this issue will be updated regularly to reflect progress and any additional improvements.