-
Notifications
You must be signed in to change notification settings - Fork 38
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
Migrate from Context API to Zustand #248
base: dev
Are you sure you want to change the base?
Migrate from Context API to Zustand #248
Conversation
@manzil-infinity180 @MAVRICK-1 how does this work with or interfere with our redis work? |
its not related to Redis, it is for better state management for react I think we need to go with context API, in future we will plan depend on our usecases |
@manzil-infinity180 Yeah but I think in future it will become more difficult to migrate to zustand because as the project grows it might become more messy to deal with changes. |
Zustand is a better choice than Context API for our use case as it improves performance by reducing unnecessary re-renders and offers a simpler, more scalable state management approach. Unlike Context API, which re-renders all consumers on state updates, Zustand uses a subscription-based model, ensuring only relevant components update. It integrates well with your Go backend, Redis caching, and Kubernetes API client, making real-time updates and state persistence more efficient. For performance and scalability, Zustand is the right choice.. |
@clubanderson Zustand handles frontend state efficiently, while Redis caches Kubernetes data in the backend. The Go backend fetches data from Redis first before querying the Kubernetes API. Zustand reduces unnecessary re-renders, ensuring smooth UI updates without directly interacting with Redis. |
ahh, I see. ok - so is this ready to merge? |
check is failing - need that fixed first |
|
@clubanderson get approval from frontend guys too |
its listing error , fix it
|
/hold |
Could you please clarify how you checked it? The backend was not functional due to I also checked the CI, and I’m curious why it didn’t return any errors . I will fix that. Thank you for your contribution! 😊 |
Yeah same happen with kunal pr too, like he have duplicate import issue even after this his test passed on ci |
|
I will confirm you tomorrow , previously it was running fine i guess i have issues with my cluster i am experimenting with my kubeconfig file |
Everything looks good and the cluster table still functions. I agree with migrating to Zustland now before the project gets bigger, since it helps with performance. I approve of this. |
No issues @MAVRICK-1 ( from updated dev branch) |
@manzil-infinity180 dev branch is working fine for me also |
@MAVRICK-1 |
@Prathamm-sahu okay got it , no issues |
Description
This PR refactors the application’s state management from Context API to Zustand to improve performance, reduce unnecessary re-renders, and simplify state handling.
Related Issue
Fixes #243
Changes Made
Checklist
Please ensure the following before submitting your PR: