2 ms·
Yeah. The trick to managing the offline states is to have it as cache. So updating and solely relying on the server, and only serve when offline. On the intera
by raihansaputra 6y ago
Yeah. The trick to managing the offline states is to have it as cache. So updating and solely relying on the server, and only serve when offline.
On the interactivity side, I feel that a lot of tools that I use daily justifies the use of SPA/PWA. Definitely can be passable with HTML SSR, but there's not much examples of it yet.
Todoist: No hassle offline handling. It will sync on it's own.
Twitter: They do intercept everything and handle/queue requests when the client is offline. It's not perfect though.
Roam: Again. Offline syncing, mainly offline search/document creation. This is a bit unique though as I think the server basically is just a sync logic.
I feel that the SPA stage is definitely a growing phase instead of a destination to be. There's a lot of problems that are not solved elegantly yet, and it's and the boundaries. But I feel that SPA and all of it's learnings will be an example of how the next step will be like. And with .wasm coming, there's a lot of possibility of different architectures/how to build apps.
Some talks that refers to why/how SPA makes sense for some problems/usecases:
Offline first PWA/Web App, with CRDT for syncing:
https://www.youtube.com/watch?v=DEcwa68f-jY https://www.youtube.com/watch?v=DEcwa68f-jY (James Long's CRDT For Mortals talk)
State management framework oriented for offline/PWA use:
https://read.reduxbook.com/ https://read.reduxbook.com/