valtio-sync

valtio-sync saves Valtio state on the device and syncs it through your application's server endpoint.

Local changes are saved automatically. Your app calls sync() to send pending changes and fetch server changes. A pending change is called dirty until it is accepted or rejected by the server.

Use it to save one user's state across devices. It does not provide realtime collaboration.

Get started

Build and debug

What your app provides

valtio-sync handles local change tracking, local storage, and the sync protocol. Your app provides:

  • Authentication and access checks.
  • The server database and its schema.
  • Business rules for accepting or rejecting changes.