Currently, an instance of the TDP client API is initialized (after authentication and config loading) and store in a context. To fetch data (variables for example):
The client is used directly inside the component
The fetch result is then passed to Redux
A selector is finally used to update the page based on the Redux store
It would be best to pass the client as a Redux middleware and to fetch data directly with Redux using thunks.
Currently, an instance of the TDP client API is initialized (after authentication and config loading) and store in a context. To fetch data (variables for example):
It would be best to pass the client as a Redux middleware and to fetch data directly with Redux using thunks.