Skip to content
philosophy contribute api

defineSharedStore

defineSharedStore<Store>(_storeName): typeof SharedStore

Defined in: core/src/document.ts:45

The main persistence & network sync object. A SharedStore is a YJS document wrapped in valtio state and tracked by a solidjs store.

  • To read reactively, use storeSnapshot. It’s a Solid store.
  • To change the state and sync it across YJS, use state and mutate a field.

Store extends object = any

string

typeof SharedStore