Skip to content

AlexanderChen1989/tea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Elm Architecture In Go

The Elm Version

program
    : { init : (model, Cmd msg)
      , update : msg -> model -> (model, Cmd msg)
      , subscriptions : model -> Sub msg
      , view : model -> Html msg
      } -> Program Never

The Go Version without subscriptions

type Msg interface{}
type Model interface{}
type Cmd []func() Msg

type Init func() (Model, Cmd)
type Update func(Msg, Model) (Model, Cmd)
type View func(Model) string

type Program struct {
	init   Init
	update Update
	view   View

	context context.Context
	cancel  func()
}

About

The Elm Architecture in Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages