Goal: I have a multipage app and I'd like to preserve the state of pages for the user so that if they click to another page and come back, the first page state is not completely reset. How can I do this?
Steps: I think an option would be to put as much as possible inside global variables or localStorage, but that's hard to set up and maintain for many components. Another option would be to move everything to a single page app and simulate a multipage app, but that doesn't sound great either.
Details: In particular I have a table with data loaded in and a custom component that I'd also like to preserve the state for.
I believe that the only way to have data proliferate across page changes is via Global variables as outlined in our docs here.
But I understand that this can be vary tedious for apps with lots of stateful components and state data that needs to proliferate.
One option would be to have an object with a number of keys and values for each piece of data for each specific component. But I am double checking with our team now to see if there are any other options or work arounds.
Could be a good potential feature request to have a 'save state' button, although this would be at risk of being interrupted by networking/connectivity/browser issues which could lead to unexpected bugs.
The best way to save data to make sure it is being fetched is to have it stored in a database, then fetched when needed and updated as users interact further with the app.