Skip to content

connect() overwrites local data and disconnect() clears local data, why? #1170

Open
@dienluong

Description

Hello,

First, thank you for the project!

rs.js is advertised as "offline-first by design". But how can an app be offline-first when local data is not kept?

To give a simple example: let's say we have a notes taking app. When not connected to a remote storage, the user can still create, delete and update notes. Once connected to online storage, the new or modified notes get sync'd with the data in online storage. That's not possible with rs.js because, based on my testing, when you connect, the online version of your data overwrites the local copy (i.e. your local modifications are lost). Furthermore, when the user disconnects from the online storage, the local copy is destroyed. So the user can no longer work on the existing notes, when disconnected.

So it seems to me that rs.js, despite the claimed "offline-first design", does not enable an app to be offline-frst.

Update: I think I realize now what "offline-first design" means in the context of rs.js. It means no Internet/remote connection but still "logged in" to a remote storage account (as opposed being in "anonymous mode").

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions