Re:Amazon staff laid off as tech giants cut costs, according...
by galoisscobi on Wednesday November 16, 2022 @03:11PM
(#33629794)
That’s helpful. Thank you for taking the time to summarize your essay and sharing it here.
Here is the summary:
* You need a storage location
* You need a defined data structure to store your state data. I recommend storing everything in a single logical storage object, because 1 is simple and simple is good.
* You will need to update and save your storage object at the needs of your application. I do it on each user interaction, because this is cheap.
* On page load you will need to access your storage object and apply it to the user facing event handlers that create your state artifacts that otherwise normally execute in response to user interactions.
That’s it. Consider the problem from the goal and work backwards to the solution.