Skip to content

Instantly share code, notes, and snippets.

@mfonism
Last active January 18, 2024 07:07
Show Gist options
  • Save mfonism/9ca01d130b862cea2814c40cb075a05e to your computer and use it in GitHub Desktop.
Save mfonism/9ca01d130b862cea2814c40cb075a05e to your computer and use it in GitHub Desktop.
Basic skeleton of an Elm sandbox application
module Main exposing (main)
import Browser
import Html exposing (Html, text)
main : Program () Model Msg
main =
Browser.sandbox
{ init = myInit
, view = myView
, update = myUpdate
}
-- MODEL
type alias Model =
{}
myInit : Model
myInit =
{}
-- VIEW
myView : Model -> Html Msg
myView model =
text "It works!"
-- UPDATE
type Msg
= NoOp
myUpdate : Msg -> Model -> Model
myUpdate msg model =
case msg of
NoOp ->
model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment