'Replace Angular class Services in React

I'm migrating an application from Angular to React. Inside the Angular application there is a service class which contains functions that set up the environment, set up permissions, and also contains environmental variables that are shared throughout the application.

I would like to use Redux toolkit to handle global state in the react application. My thought process is to place the environmental variables into the redux store and create thunks for all of the class methods.

What is the best approach to moving Angular service classes to React-redux?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source