Say on the frontend I have a dashboard with a set of user inputs and a paginated data table that renders based off of those inputs. Upon applying new filters or manually refreshing data, a request is sent to pull data from backend database. However, if the user chooses another page on the data table, no request should be sent to get data from the backend database because that data is constantly updating. In other words, only new data should be shown when new filters are applied or user explicitly refreshes NOT when clicking through different table pages.
So, wondering if using client side storage liked indexed db for the most recent request makes sense here and then paginating from client side storage.
CodePudding user response:
If you want separate pages to be based on the data as of the latest filter or refresh, then unless you want to have vast quantities of versioned data on the back-end, paginating on the client side sounds like the way to go.
Depending on the size of your data, Indexed DB could be a great option for performance, but if you aren't expecting large amounts of data, then simply storing the response in state might be the simpler solution.