I am building an Angular app that is connected to a backend REST API. At the moment the app is only fetching data from the backend without updaing any of it. This question came up because I was about to make the data editable in the frontend - and be transmitted to the backend.
Right now the data is loaded into the components using Angular services
. This works ok but I'd like to use a global ngrx store
instead. This raises the question: Should I continue to load (and now send) data to the backend by using services, or is it a better Idea to use ngrx Effects
?
I think that it's far better to use a store in every component than dealing with fetching or services, but using Effects to send and load every bit of data does not look right to me.
I found this article and it states that it is not a good idea to do backend communication in Effects and I do agree (though I'm not sure, thats why I'm asking). Is there a good way to combine services and a store?
How do you structure apps that have a similar structure? Best regards.
There is a trade-off:
This video is 46 minutes long but can help you: https://www.youtube.com/watch?v=eBLTz8QRg4Q