Documentation
¶
Overview ¶
Package ui provides the preferred public component API for GoWebComponents.
It exposes:
- CreateElement for component composition
- Render for browser mounting
- UseState, UseEffect, UseMemo, UseRef, and UseId for local stateful logic
- UseEvent for typed event handler wrapping
The ui package is the recommended replacement for the older dom/hooks/render split when authoring new components.
Index ¶
- func Render(root Node, selector string)
- func UseCallback[T any](fn T, deps ...interface{}) T
- func UseEffect(effect func() func(), deps ...interface{})
- func UseId() string
- func UseMemo[T any](compute func() T, deps ...interface{}) T
- type ChangeEvent
- type Event
- type FocusEvent
- type FormEvent
- type Handler
- type InputEvent
- type KeyboardEvent
- type MouseEvent
- type Node
- type Ref
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UseCallback ¶
func UseCallback[T any](fn T, deps ...interface{}) T
Types ¶
type ChangeEvent ¶
type FocusEvent ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func RawHandler ¶
func RawHandler(value interface{}) Handler
type InputEvent ¶
type KeyboardEvent ¶
type MouseEvent ¶
type Node ¶
func CreateElement ¶
func CreateElement(component interface{}, props ...interface{}) Node
Click to show internal directories.
Click to hide internal directories.