Reference

Store

Provides reactive state access, updates, transactions, selectors, and subscriptions.

Signature

interface Store

Members

state: ReadonlyCell<T>
function get(): T
function replace(next: StoreReplacer<T>): void
function select<U>(selector: (state: T): U, equality?: StoreEquality<U>): SelectedCell<U>
function set(next: StoreSetter<T>): void
function subscribe(listener: StoreListener<T>): (): void
function transaction(fn: (): void): void
function update(updater: (previous: T): T | Partial<T>): void