3 ms·
I have been exploring offline-first approaches to building web apps. In a nutshell, the UI interacts with local state, and a background service syncs local sta
by yen223 6y ago
I have been exploring offline-first approaches to building web apps.
In a nutshell, the UI interacts with local state, and a background service syncs local state with server-side state and vice-versa. This theoretically allows the app to remain fully functional even when offline, while maintaining the benefits of your stuff being accessible from all your devices. There's also UX gains as well - your UI interactions don't need to be blocked by network calls.
In practice, that means using something like IndexedDb to manage client-side state, and modelling data as CRDTs or similar in order to have eventual consistency with the server.