So, I'm trying to use NGXS for the first time, and I noticed that when I add the following code in Angular's ngOnInit()
function, it always fetches the API:
this.store.dispatch(new FooActions.GetAll());
This might seem like a stupid question but, shouldn't NGXS check if the store already has data and use that instead of calling the API? Or is it not part of the feature? And should I just do the checking manually each time I'm dispatching an action for getting data from the server?