Documentation ¶
Index ¶
- Constants
- Variables
- func Init(loggerInit *Logger)
- func RenderChildren(component Component) string
- func SetDocument(doc *Document)
- func UpdateComponentArray[T Component, Props any](input *[]T, newLen int, newT func(props *Props) T, newProps []*Props)
- type Component
- type Document
- type Logger
- type State
- type Websocket
Constants ¶
View Source
const ( ERROR = iota WARNING INFO DEBUG )
Variables ¶
View Source
var ErrCouldNotGetWebsocket = errors.New("could not get websocket")
Functions ¶
func RenderChildren ¶
func SetDocument ¶
func SetDocument(doc *Document)
func UpdateComponentArray ¶
func UpdateComponentArray[T Component, Props any](input *[]T, newLen int, newT func(props *Props) T, newProps []*Props)
UpdateComponentArray provides functionality to control a variable-length collection of components, such as a list of rows in a table, or any other collection of sub-components (children).
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func GetDocument ¶
func GetDocument() *Document
func NewDocument ¶
func (*Document) AddEventListener ¶
func (*Document) GetComponentTree ¶
type Logger ¶ added in v0.1.2
type Logger struct {
Level int
}
Logger in the goFE package is a simple logger that uses println instead of fmt for a small wasm binary size. The level is hierarchical, with the highest level being the most verbose.
type State ¶
type State[T any] struct { Value *T // contains filtered or unexported fields }
State is a generic struct that holds a value and a channel
type Websocket ¶ added in v0.1.3
type Websocket struct {
// contains filtered or unexported fields
}
func NewWebsocket ¶ added in v0.1.3
func (*Websocket) MessageChan ¶ added in v0.1.3
Click to show internal directories.
Click to hide internal directories.