To manage global states in our application, we have created a custom globalStateProvider using react context Api, using which you can manage global states in the application..
First you need to create Reducers, that is a basically pure JS functions which take in the previous state and an action and return the newly updated state.
You can use Global States in the following ways: