Hello @Pedro Pinela,
It depends on factors such as data volume, user experience, and control:
Two Aggregates with "Only on Demand":
Pros: Reactive nature, simplicity.
Cons: Extra fetch requests, potential delay.
Data Action:
Pros: Control, caching, flexibility.
Cons: Complexity, need to manage initial load.
Based on your requirement you can consider following things and use accordingly:
Data volume: Large data may impact performance, requiring caching and query optimization.
User experience: Decide between slight delay (aggregates) or more control (data actions).
Caching: Implement caching for performance improvement.
Testing: Perform real-world performance tests to identify the best approach.
The choice depends on specific requirements and trade-offs, and combining both approaches can be beneficial in achieving the desired performance.
Hope it helps!
Thanks