Init

io.eezo.live.Init
final class Init[S] extends Async[S]

The mount-time context: what Component.init may do beyond computing state.

subscribe registers a transition to run when a topic delivers: the message and the state at delivery time in, the next state out, applied on the page's own thread like any event. The window closes when init returns — the page seals the context — so the phase rule "subscriptions happen in init" is a thrown exception rather than a convention.

Attributes

Source
Component.scala
Graph
Supertypes
class Async[S]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def subscribe[A](topic: Topic[A])(transition: (A, S) => S): Unit

Attributes

Source
Component.scala

Inherited methods

def apply(work: => S => S): Unit

Runs work off the page thread; its returned transition applies like a topic message. A work that throws is logged and moves nothing — nobody is blocked on it, so the log line is the whole story.

Runs work off the page thread; its returned transition applies like a topic message. A work that throws is logged and moves nothing — nobody is blocked on it, so the log line is the whole story.

Attributes

Inherited from:
Async
Source
Component.scala
def get(url: String, headers: (String, String)*)(react: Reply => S => S): Unit

Attributes

Inherited from:
Async
Source
Component.scala
def post(url: String, body: String, contentType: String = ..., headers: (String, String)*)(react: Reply => S => S): Unit

Attributes

Inherited from:
Async
Source
Component.scala