I have been working for quite some time now in small/medium sized projects with Angular and as long as there is some data which needs to be loaded from a server, the team directly goes for storing it into a Redux store. This allows for the data to be preserved when a user navigates between "pages" and if they decide to refresh their page.
However, recently I have been doing a "proper" Angular tutorial and we managed to achieve the same results with a combination of service (provided in in app.module.ts
) to keep the data and resolvers. The resolver makes sure that when my main page is loaded, the data required is loaded into the service. Additionally, if the data is not too big I can even store it into the localStorage
and thus, eliminating the HTTP
requests in the resolver if the data is not there.
Except for the unlikely use case where 1. there needs to be a lot of data loaded and 2. the user refreshes for some reason the webpage very often, I don't really see why we should be implementing a complete redux store.
Are there more reasons to use Redux which I have not understood or are there more downsides of using this approach?