Usage without schema
Usage with schema
API
| Method | Description |
|---|---|
set(value: T) | Write a new value |
value() | Returns current value or null if not set |
onChange(fn) | Subscribe — returns unsubscribe function |
Conflict resolution
Conflicts are resolved by HLC timestamp (wall clock + logical counter). The write with the highest timestamp wins. If timestamps are equal, the write from the highestclient_id wins. This is deterministic and consistent across all replicas.