Handle data fetching the correct way.
I am building a tab based UI.
On inital load, I would load a list of pinned tabs and one tab detail (via api1)
On tab switch, I would reload the detail content of one tab (via api2)
The problem here is that the detail content of tab on the UI is come from 2 source listed above.
I wonder how I should handle it or redesign the api1 (by passing selected tab) and remove api2, accepting some redundant data being fetched over for the pinned tabs?
Thanks for your suggestion
On inital load, I would load a list of pinned tabs and one tab detail (via api1)
On tab switch, I would reload the detail content of one tab (via api2)
The problem here is that the detail content of tab on the UI is come from 2 source listed above.
I wonder how I should handle it or redesign the api1 (by passing selected tab) and remove api2, accepting some redundant data being fetched over for the pinned tabs?
Thanks for your suggestion
