For a web app I am working on I have a pretty basic relational database. I access this database through a RESTful API and generate the markup in React once the data is retrieved.
If I find myself constantly manipulating/processing these JSON responses on the client-side just to structure these objects into more friendly structures for my UI, is that a sign that perhaps I am doing too much on the client?
I am relatively new in the industry to begin with and I am more concerned with knowing when I should bring these things up to another developer who is perhaps working on the backend in question.
This perhaps can bleed into a broader question about REST APIs for Web Apps in general:
Should I expect the responses to my data fetches on the front-end be already structured according to the UI's requirements or would I be asking for too much?
A good example of this would be a category list for a 'Products' page. Is it reasonable that I would fetch the total list of products, and then build the category list from that data or should I expect to have an already structured list of the categories, etc. in the response object when I initially set out to fetch the list of products?