HotReload

tyrian.HotReload
object HotReload

A very simple mechanism to allow automatic loading and saving of your applications model to local storage. Uses:

  • During development, allows you to carry on where you left off between site rebuilds.
  • Acts as a user session, to remember where a website/app visitor/user was when they left.

Attributes

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

Members list

Type members

Classlikes

final case class Error(message: String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def bootstrap[F[_] : Async, Model, Msg](key: String, decode: Option[String] => Either[String, Model])(resultToMessage: Either[String, Model] => Msg): Cmd[F, Msg]

Used during init to try and load an existing session

Used during init to try and load an existing session

Attributes

def snapshot[F[_] : Async, Model](key: String, model: Model, encode: Model => String): Cmd[F, Nothing]

Simple command to store the model. Can be performed on a regular basis if used in combination with a Sub.every subscription.

Simple command to store the model. Can be performed on a regular basis if used in combination with a Sub.every subscription.

Attributes