Skip to content

Instantly share code, notes, and snippets.

@Ikechukwunwachukwu
Forked from mfonism/Main.elm
Created December 3, 2023 20:55
Show Gist options
  • Save Ikechukwunwachukwu/e22c7009370d9f0bab5e825efbc14abe to your computer and use it in GitHub Desktop.
Save Ikechukwunwachukwu/e22c7009370d9f0bab5e825efbc14abe 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