|
|
|
|
|
by aatd86
315 days ago
|
|
I must be a bit dense on this little Sunday morning but I don't quite get the problem solved. Is it an issue with reactivity between browser tabs? Hence the use of the Broadcast Channel API? The reactivity being implemented in svelte, what is different from any normal app? could have been react with mobx, zustand, recoil, etc but that's not too relevant. This is just how frontend frameworks are nowadays. Especially since it is single-user (player? sic)? Syncing between the backend server (remote state) and the local sqlite instance (local state) shouldn't really require much work? A simple websocket connection could do the trick to push from the remote server to the local device and then push the changes to sqlite again.
But that's not too surprising to me. I must not have understood something... |
|
A lot of these tools (and what the author wrote) offer toolkits to do this well, not having to implement and track all these changes in state manually.
In this case the author is running SQLite in the browser, and that syncs to SQLite on the server.