Help us shape the future of Go! Take the 2026 Go Developer Survey

vdom

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File() string

File is a reference to the vdom library itself js:"File,omit"

func Pragma

func Pragma() string

Pragma is a reference to how elements get created js:"Pragma,omit"

func Render

func Render(component Child, parent window.Node, merge window.Node)

Render the component

func String

func String(component Child) string

String turns the component into a string

func Use

func Use(pragma, filepath string)

Use fn js:"Use,omit"

Types

type Child

type Child interface {
	Render() Node
}

Child interface

type Component

type Component interface {
	// js:"render"
	Render() Node
	// js:"setState"
	SetState(state interface{})
	// js:"forceUpdate"
	ForceUpdate()
}

Component struct

type Node

type Node interface {
	String() string
}

Node interface

type Text

type Text struct {
	Component
	Node
	// contains filtered or unexported fields
}

Text struct js:"text,omit"

func S

func S(value string) *Text

S creates a string

func (*Text) Render

func (s *Text) Render() Node

Render returns itself

func (*Text) String

func (s *Text) String() string

String returns the text node value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL