Skip to content

coStars/elm-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elm is a programming language that compiles to JavaScript.

The highlight features are great performance:

  • No runtime errors in practice. No null. No undefined is not a function.

  • Friendly error messages that help you add features more quickly.

    alt

  • Well-architected code that stays well-architected as your app grows.

  • Automatically enforced semantic versioning for all Elm packages.

How to install :

sudo npm install -g elm

To install elm-package.json:

elm-package install

The Basic Pattern :

  • Model — the state of your application
  • Update — a way to update your state
  • View — a way to view your state as HTML
import Html exposing (..)


-- MODEL

type alias Model = { ... }


-- UPDATE

type Msg = Reset | ...

update : Msg -> Model -> Model
update msg model =
  case msg of
    Reset -> ...
    ...


-- VIEW

view : Model -> Html Msg
view model =
  ...

To run this example:

elm-reactor

This starts a server at http://localhost:8000, then type

http://localhost:8000/main.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published