Documentation
¶
Rendered for js/wasm
Index ¶
- type Atom
- type Computed
- type MapStore
- func (m *MapStore) DeleteKey(key string)
- func (m *MapStore) Get() map[string]any
- func (m *MapStore) GetKey(key string) any
- func (m *MapStore) Set(value map[string]any)
- func (m *MapStore) SetKey(key string, value any)
- func (m *MapStore) Subscribe(callback func(map[string]any)) Unsubscriber
- func (m *MapStore) Value() map[string]any
- type ReadableStore
- type ReadonlyStore
- type Store
- type Unsubscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Atom ¶
type Atom[T any] struct { // contains filtered or unexported fields }
func NewAtomWithHMR ¶
func (*Atom[T]) Subscribe ¶
func (a *Atom[T]) Subscribe(callback func(T)) Unsubscriber
type Computed ¶
type Computed[T any] struct { // contains filtered or unexported fields }
func NewComputed ¶
func NewComputed[S any, T any](source ReadableStore[S], transform func(S) T) *Computed[T]
func (*Computed[T]) Subscribe ¶
func (c *Computed[T]) Subscribe(callback func(T)) Unsubscriber
type MapStore ¶
type MapStore struct {
// contains filtered or unexported fields
}
type ReadableStore ¶
type ReadableStore[T any] interface { Get() T Subscribe(callback func(T)) Unsubscriber }
type ReadonlyStore ¶
type ReadonlyStore[T any] interface { Get() T Subscribe(callback func(T)) Unsubscriber Value() T }
type Store ¶
type Store[T any] interface { Get() T Set(value T) Subscribe(callback func(T)) Unsubscriber Value() T }
type Unsubscriber ¶
type Unsubscriber func()
Click to show internal directories.
Click to hide internal directories.