Tyrian

object Tyrian
class Object
trait Matchable
class Any
Tyrian.type

Type members

Types

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

Value members

Concrete methods

def render[Model, Msg](includeDocType: Boolean, model: Model, view: Model => Html[Msg]): String

Takes a normal Tyrian Model and view function and renders the html to a string prefixed with the doctype.

Takes a normal Tyrian Model and view function and renders the html to a string prefixed with the doctype.

def render[Model, Msg](model: Model, view: Model => Html[Msg]): String

Takes a normal Tyrian Model and view function and renders the html to a string.

Takes a normal Tyrian Model and view function and renders the html to a string.

def render[Model, Msg](includeDocType: Boolean, html: Html[Msg]): String

Takes a Tyrian HTML view, and renders it into to a string prefixed with the doctype.

Takes a Tyrian HTML view, and renders it into to a string prefixed with the doctype.

def render[Model, Msg](html: Html[Msg]): String

Takes a Tyrian HTML view, and renders it into to a string.

Takes a Tyrian HTML view, and renders it into to a string.

def render[Model, Msg](includeDocType: Boolean, elems: List[Elem[Msg]]): String

Takes a list of Tyrian elements, and renders the fragment into to a string prefixed with the doctype.

Takes a list of Tyrian elements, and renders the fragment into to a string prefixed with the doctype.

def render[Model, Msg](elems: List[Elem[Msg]]): String

Takes a list of Tyrian elements, and renders the fragment into to a string.

Takes a list of Tyrian elements, and renders the fragment into to a string.

def render[Model, Msg](includeDocType: Boolean, elems: Elem[Msg]*): String

Takes repeatingTyrian elements, and renders the fragment into to a string prefixed with the doctype.

Takes repeatingTyrian elements, and renders the fragment into to a string prefixed with the doctype.

def render[Model, Msg](elems: Elem[Msg]*): String

Takes repeating Tyrian elements, and renders the fragment into to a string.

Takes repeating Tyrian elements, and renders the fragment into to a string.

def start[F[_] : Async, Model, Msg](node: Element, init: (Model, Cmd[F, Msg]), update: Model => Msg => (Model, Cmd[F, Msg]), view: Model => Html[Msg], subscriptions: Model => Sub[F, Msg], maxConcurrentTasks: Int): Resource[F, TyrianRuntime[F, Model, Msg]]

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