Tyrian

tyrian.Tyrian
object Tyrian

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Tyrian.type

Members list

Type members

Types

type Event = Event
type HTMLInputElement = HTMLInputElement
type KeyboardEvent = KeyboardEvent
type MouseEvent = MouseEvent

Value members

Concrete methods

def start[F[_] : Async, Model, Msg](node: Element, router: Location => Msg, init: (Model, Cmd[F, Msg]), update: Model => Msg => (Model, Cmd[F, Msg]), view: Model => Html[Msg], subscriptions: Model => Sub[F, Msg]): F[Nothing]

Directly starts the app. Computes the initial state of the given application, renders it on the given DOM element, and listens to user actions

Directly starts the app. Computes the initial state of the given application, renders it on the given DOM element, and listens to user actions

Type parameters

F

The effect type to use, e.g. IO

Model

Type of model

Msg

Type of messages

Value parameters

init

initial state

node

the DOM element to mount the app to

runner

the function that runs the program. Has a type of F[Option[Msg]] => (Either[Throwable, Option[Msg]] => Unit) => Unit, essentially: task.unsafeRunAsync(callback)

subscriptions

subscriptions function

update

state transition function

view

view function

Attributes