Last active
December 20, 2024 22:25
-
-
Save cbpudding/1ac2ced38bc26cea303faf02fb5e647e to your computer and use it in GitHub Desktop.
The code I rewrite all the time to make a single page web application in Elm
This file contains hidden or 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 Main exposing (..) | |
import Browser exposing (Document, UrlRequest) | |
import Browser.Navigation exposing (Key) | |
import Url exposing (Url) | |
type alias Flags = () | |
type alias Model = () | |
type alias Msg = () | |
main : Program Flags Model Msg | |
main = | |
Browser.application | |
{ init = init | |
, onUrlChange = onUrlChange | |
, onUrlRequest = onUrlRequest | |
, subscriptions = subscriptions | |
, update = update | |
, view = view | |
} | |
init : Flags -> Url -> Key -> (Model, Cmd Msg) | |
init _ _ _ = | |
((), Cmd.none) | |
onUrlChange : Url -> Msg | |
onUrlChange _ = | |
() | |
onUrlRequest : UrlRequest -> Msg | |
onUrlRequest _ = | |
() | |
subscriptions : Model -> Sub Msg | |
subscriptions _ = | |
Sub.none | |
update : Msg -> Model -> (Model, Cmd Msg) | |
update _ model = | |
(model, Cmd.none) | |
view : Model -> Document Msg | |
view _ = | |
{ title = "" | |
, body = [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment