asgr-dk/elm-msg-replay/2.0.0

NOTE: the latest version is 2.1.0

MsgReplay

Reliable hot reloading for Elm programs!

Programs

This API mirrors the elm/browser package found here.

type alias Program flags appModel appMsg =
Program flags (Model appModel) (Msg appMsg)

A program with message-replay enabled.

{ init : flags -> Url -> Key -> ( appModel, Cmd appMsg )
, update : appMsg -> appModel -> ( appModel, Cmd appMsg )
, subscriptions : appModel -> Sub appMsg
, view : appModel -> Document appMsg
, onUrlChange : Url -> appMsg
, onUrlRequest : UrlRequest -> appMsg
, enableReplay : flags -> Bool
, initMsgs : flags -> Value
, saveMsgs : Value -> Cmd appMsg
, saveMsgsDelayMillis : Float
, encodeMsg : appMsg -> Value
, msgDecoder : Decoder appMsg
}
-> Program flags appModel appMsg

Create an application that manages Url changes. More about that here.

{ init : flags -> ( appModel, Cmd appMsg )
, update : appMsg -> appModel -> ( appModel, Cmd appMsg )
, subscriptions : appModel -> Sub appMsg
, view : appModel -> Document appMsg
, enableReplay : flags -> Bool
, initMsgs : flags -> Value
, saveMsgs : Value -> Cmd appMsg
, saveMsgsDelayMillis : Float
, encodeMsg : appMsg -> Value
, msgDecoder : Decoder appMsg
}
-> Program flags appModel appMsg

Create an HTML document managed by Elm. More about that here.

{ init : flags -> ( appModel, Cmd appMsg )
, update : appMsg -> appModel -> ( appModel, Cmd appMsg )
, subscriptions : appModel -> Sub appMsg
, view : appModel -> Html appMsg
, enableReplay : flags -> Bool
, initMsgs : flags -> Value
, saveMsgs : Value -> Cmd appMsg
, saveMsgsDelayMillis : Float
, encodeMsg : appMsg -> Value
, msgDecoder : Decoder appMsg
}
-> Program flags appModel appMsg

Create an HTML element managed by Elm. More about that here.