Last active
March 29, 2020 17:07
-
-
Save sethlivingston/d49423598d45dcd1813573a29f59d8cf to your computer and use it in GitHub Desktop.
Elm template for a Browser.element app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TemplateModule exposing (main) | |
import Browser | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
-- MODEL | |
type alias Model = | |
{} | |
type alias Flags = | |
{} | |
initialModel : Flags -> Model | |
initialModel flags = | |
{} | |
init : Flags -> ( Model, Cmd Msg ) | |
init flags = | |
( initialModel flags, Cmd.none ) | |
-- UPDATE | |
type Msg | |
= NoOp | |
update : Msg -> Model -> ( Model, Cmd Msg ) | |
update msg model = | |
( model, Cmd.none ) | |
-- VIEW | |
view : Model -> Html Msg | |
view model = | |
div [] [] | |
-- SUBSCRIPTIONS | |
subscriptions : Model -> Sub Msg | |
subscriptions _ = | |
Sub.none | |
-- MAIN | |
main : Program Flags Model Msg | |
main = | |
Browser.element | |
{ init = init | |
, update = update | |
, view = view | |
, subscriptions = subscriptions | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment