The question is conceptual, should the dataProvider apply formatting over the data before returning it to react-admin's frontend, or dataProvider must play the role only for data fetcher and must always return the data in the format it comes from the back-end service? What do you think?
What would you do in case you get the data from the back-end deeply nested, in complex structure and you need it simpler for the display? Where would you reduce/format it:
- In the dataProvider, right after receiving it from the server and before sending it to React-admin's UI, or
- In the UI (a.k.a. Resource view) or maybe
- By using a custom reducer: https://marmelab.com/react-admin/Actions.html#using-a-custom-reducer
How is the most elegant and conceptual right way of doing this, in your opinion?