I am new to NgRx hence the confusion. I have a simple component which shows a list of objects e.g. Orders. It gets the list of Orders to be shown from backend using an Effect. Only problem is I want to transform this response from the BE into a simple list of objects to show in the component. I am confused as to where to transform it. I see 4 options:
- Transform it in the service that gets the list from the backend - Quite simple to implement not sure if its the best way.
- Transform it in the effect - If here then why not in the service?
- Transform it using the reducer - Seems like a valid place.
- Transform it using a selector - We won't need a view state as the view state will be derived from the selector every time a component is opened. May be even make it slow because it has to transform the state every time.
This is my understanding so far. I would like to know if its correct and I would also like to know the best practice to handle this case which seems should be fairly common in applications.