tea

package
v0.0.0-...-075ae88 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App[M AppModel[M]] struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp[M AppModel[M]](model M) *App[M]

func (*App[Model]) Run

func (app *App[Model]) Run(ctx context.Context, node vdom.DomNode)

func (*App[Model]) SendMessage

func (app *App[Model]) SendMessage(msg Message[Model])

type AppModel

type AppModel[Model any] interface {
	View(MessageSender[Model]) vdom.VNode
}

type Message

type Message[Model any] interface {
	Update(Model) (Model, func(context.Context, func(Message[Model])))
}

type MessageSender

type MessageSender[Model any] interface {
	Send(Message[Model])
	Event(Message[Model]) vdom.EventHandler
}

Jump to

Keyboard shortcuts

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