The state management library front-ends are looking for is a database (2023)
interjectedfuture.com
interjectedfuture.com
I think a client-side database like sqlite is not a bad idea though. It would store the session and would speed up page loads when the cache is available. I wonder if there are any frameworks implementing this pattern.