org.getshaka.shaka
Type members
Classlikes
Base trait for Bindings. Since Bindings are hierarchical, they must manage registered child bindings.
Base trait for Bindings. Since Bindings are hierarchical, they must manage registered child bindings.
A Shaka Component provides a template for some part of an application, as well as the means to render said template to the DOM.
A Shaka Component provides a template for some part of an application, as well as the means to render said template to the DOM.
Persists to LocalStorage
You should not use this StorageManager for
types that may be Null or Unit, since localStorage returns only null if the
value is undefined. Instead, use an Option type, or create your own
StorageManager that uses a marker character when encountering null, like the
ancient Linear A character "༗"
Persists to LocalStorage
You should not use this StorageManager for
types that may be Null or Unit, since localStorage returns only null if the
value is undefined. Instead, use an Option type, or create your own
StorageManager that uses a marker character when encountering null, like the
ancient Linear A character "༗"
- See also:
- Companion:
- object
Binding subclass specialized for Nodes
Binding subclass specialized for Nodes
- Type parameters:
- V
bound value type
- Value parameters:
- builder
Function to create the DOM
- parentElement
Element to append to
- state
State this Binding is bound to
- Companion:
- object
Open state that must be encapsulated.
Open state that must be encapsulated.
- Type parameters:
- V
the value.
- Value parameters:
- initialValue
The State's initial value, discarded if the StorageManager can fetch a value.
Light-weight Binding subclass for binding CSS and JS properties.
Light-weight Binding subclass for binding CSS and JS properties.
- Type parameters:
- V
the state value type
- Value parameters:
- builder
Function binding the props
- state
dependent State
Binding at the root of the heirarchy. Operations do nothing.
Binding at the root of the heirarchy. Operations do nothing.
Persists to Session Storage
You should not use this StorageManager for
types that may be Null or Unit, since localStorage returns only null if the
value is undefined. Instead, use an Option type, or create your own
StorageManager that uses a marker character when encountering null, like the
ancient Linear A character "༗"
Persists to Session Storage
You should not use this StorageManager for
types that may be Null or Unit, since localStorage returns only null if the
value is undefined. Instead, use an Option type, or create your own
StorageManager that uses a marker character when encountering null, like the
ancient Linear A character "༗"
- See also:
- Companion:
- object
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.
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.
Used for fetching and storing States
Used for fetching and storing States
- Type parameters:
- V
the value type
A [[Component]] wrapped in a Custom Element. Custom Elements have useful
lifecycle callbacks and can attach shadow-dom.
A [[Component]] wrapped in a Custom Element. Custom Elements have useful
lifecycle callbacks and can attach shadow-dom.
- See also:
- Companion:
- object
Types
Given a parent Element and Binding, returns a function from the State value V to Unit.
Given a parent Element and Binding, returns a function from the State value V to Unit.