i have a lot of components to display different parts of a entity stored in the store. You can bind the entity id to the component and in the attached method, the component checks if the entity is already in the store and if not, dispatches the load action which in turn creates an api call to load the entity. The promise of the dispatch call is awaited to show an loading animation.
The problem is now, when i have multiple components on the same page and the entity was not loaded before, each component dispatches the load action and the api gets called multiple times.
Do you know a way, to access the currently queued/running actions with parameters, to return the promise of the running action instead of enqueuing a new action when calling dispatch?