State

abstract class State[V](initialValue: => V, storageManager: StorageManager[V])

A State that can be used to bind Nodes and their properties. You can get the current value with myState.value, and update with myState.value = newValue. These two methods are protected, so that state update logic is encapsulated within the object itself. This provides the same benefit as Redux's action - reducer - store trifecta.

Type parameters:
V

the value.

Value parameters:
initialValue

The State's initial value, discarded if the StorageManager can fetch a value.

storageManager

How the State should be persisted, such as in LocalStorage. By default, the State has no storage.

class Object
trait Matchable
class Any
class OpenState[V]

Value members

Concrete methods

def bind(builder: () => V)(using pe: Element, pb: Binding[_]): Unit

Construct a Binding for DOM Nodes

Construct a Binding for DOM Nodes

def bindProps(builder: () => V)(using pb: Binding[_]): Unit

Construct a lighter-weight Binding for CSS/JS Props.

Construct a lighter-weight Binding for CSS/JS Props.

def removeBinding(b: Binding[V]): Unit

Removes a Binding from this State.

Removes a Binding from this State.