TyrianAppF

tyrian.TyrianAppF
See theTyrianAppF companion object
trait TyrianAppF[F[_], Msg, Model]

The TyrianApp trait can be extended to conveniently prompt you for all the methods needed for a Tyrian app, as well as providing a number of standard app launching methods.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait TyrianIOApp[Msg, Model]
trait TyrianZIOApp[Msg, Model]

Members list

Value members

Abstract methods

def init(flags: Map[String, String]): (Model, Cmd[F, Msg])

Used to initialise your app. Accepts simple flags and produces the initial model state, along with any commands to run at start up, in order to trigger other processes.

Used to initialise your app. Accepts simple flags and produces the initial model state, along with any commands to run at start up, in order to trigger other processes.

Attributes

def router: Location => Msg
def subscriptions(model: Model): Sub[F, Msg]

Subscriptions are typically processes that run for a period of time and emit discrete events based on some world event, e.g. a mouse moving might emit it's coordinates.

Subscriptions are typically processes that run for a period of time and emit discrete events based on some world event, e.g. a mouse moving might emit it's coordinates.

Attributes

def update(model: Model): Msg => (Model, Cmd[F, Msg])

The update method allows you to modify the model based on incoming messages (events). As well as an updated model, you can also produce commands to run.

The update method allows you to modify the model based on incoming messages (events). As well as an updated model, you can also produce commands to run.

Attributes

def view(model: Model): Html[Msg]

Used to render your current model into an HTML view.

Used to render your current model into an HTML view.

Attributes

Concrete methods

Specifies the number of queued tasks that can be consumed at any one time. Default is 1024 which is assumed to be more than sufficient, however the value can be tweaked in your app by overriding this value.

Specifies the number of queued tasks that can be consumed at any one time. Default is 1024 which is assumed to be more than sufficient, however the value can be tweaked in your app by overriding this value.

Attributes

def launch(containerId: String): Unit

Launch the app and attach it to an element with the given id. Can be called from Scala or JavaScript.

Launch the app and attach it to an element with the given id. Can be called from Scala or JavaScript.

Attributes

def launch(node: Element): Unit

Launch the app and attach it to the given element. Can be called from Scala or JavaScript.

Launch the app and attach it to the given element. Can be called from Scala or JavaScript.

Attributes

def launch(containerId: String, flags: Dictionary[String]): Unit

Launch the app and attach it to an element with the given id, with the supplied simple flags. Can be called from Scala or JavaScript.

Launch the app and attach it to an element with the given id, with the supplied simple flags. Can be called from Scala or JavaScript.

Attributes

def launch(node: Element, flags: Dictionary[String]): Unit

Launch the app and attach it to the given element, with the supplied simple flags. Can be called from Scala or JavaScript.

Launch the app and attach it to the given element, with the supplied simple flags. Can be called from Scala or JavaScript.

Attributes

def launch(containerId: String, flags: Map[String, String]): Unit

Launch the app and attach it to an element with the given id, with the supplied simple flags. Can only be called from Scala.

Launch the app and attach it to an element with the given id, with the supplied simple flags. Can only be called from Scala.

Attributes

def launch(node: Element, flags: Map[String, String]): Unit

Launch the app and attach it to the given element, with the supplied simple flags. Can only be called from Scala.

Launch the app and attach it to the given element, with the supplied simple flags. Can only be called from Scala.

Attributes

def ready(node: Element, flags: Map[String, String]): Unit

Abstract fields

val run: F[Nothing] => Unit