OpenMetadata
OpenMetadata copied to clipboard
ui: alternative for global state management for app wide data
NOTE: THIS IS NOT A BLOCKER FOR ANY RELEASE
At present, React Context is employed to manage globally utilized data in our application. However, this method presents challenges as we need to maintain separate contexts for different data, which becomes increasingly unmanageable as the application expands. To address this, we will adopt Zustand for handling global state.
Zustand is a lightweight, swift, and scalable state management solution. Its straightforward API, built on hooks, provides ease of use. While it maintains clarity and flux-like behavior, it avoids excessive boilerplate or imposing specific opinions.
Majorly we have to replace these contexts with zustand
- [x] AuthContext https://github.com/open-metadata/OpenMetadata/pull/15082
- [x] ApplicationConfig Context https://github.com/open-metadata/OpenMetadata/pull/15082
- [x] GlobalSearchProvider https://github.com/open-metadata/OpenMetadata/pull/15804
- [x] DomainProvider https://github.com/open-metadata/OpenMetadata/pull/15804
- [ ] ApplicationsProvider @karanh37
Let's start using Zustand for globally stored data for the application
Can you list down the places where we need to implement this? I will review it so that we can plan it better
Can you list down the places where we need to implement this? I will review it so that we can plan it better
Yes @chirag-madlani , I have updated the description, thanks