microsoftgraph / microsoft-graph-explorer-v4

React/Redux version of Graph Explorer used to learn the Microsoft Graph Api
https://developer.microsoft.com/graph/graph-explorer
MIT License
202 stars 84 forks source link

Transition some properties from Redux to Context API #3166

Open thewahome opened 1 month ago

thewahome commented 1 month ago

Is your feature request related to a problem? Please describe. We are currently managing global state properties in our Redux store. Some of the properties should sit at a higher level instead and keep the redux store for content that changes a lot more. Some of these properties are:

Describe the solution you'd like Moving these properties from Redux to Context API will lead to performance improvements, as the Context API is more lightweight and helps avoid unnecessary re-renders. It also enhances developer experience by providing a simpler and more straightforward approach to state management.

Describe alternatives you've considered We've been using the alternative of having all items that are shared among 2 components managed in redux.

Additional context The Context API is particularly suitable for managing state that doesn't change frequently or isn't shared among many components. It's great for passing down static data or when you have a moderate number of components. Since it's built into React, it doesn't influence the final bundle size and is integrated by design. This transition will simplify our state management and make our application more efficient.