Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ELM 101

David Anguita
September 08, 2017

ELM 101

David Anguita

September 08, 2017
Tweet

More Decks by David Anguita

Other Decks in Technology

Transcript

  1. ELM 101
    David Anguita @ Jobandtalent

    View Slide

  2. View Slide

  3. The core language

    View Slide

  4. ● Purely functional (looks like Haskell)
    ● Expressive syntax
    ● Statically typed
    ● Immutable data structures
    ● Very nice debugger
    ● Compiles to JavaScript

    View Slide

  5. No more runtime exceptions

    View Slide

  6. How does it look like?

    View Slide

  7. DEMO

    View Slide

  8. The Elm Architecture

    View Slide

  9. Model — the state of your application
    Update — a way to update the state
    View — a way to view your state as HTML

    View Slide

  10. Command — triggers an event identified by a Message type
    Subscription — listens for external input

    View Slide

  11. Image credit: https://sporto.github.io/elm-workshop/

    View Slide

  12. VS React + Redux

    View Slide

  13. Elm React + Redux
    Model State
    Update Reducer
    Message Action (kind of)

    View Slide

  14. DEMO

    View Slide

  15. Where to get started

    View Slide

  16. ● http://elm-lang.org/docs/
    ● http://package.elm-lang.org/packages/elm-lang/core/latest/
    ● NoRedInk/elm-style-guide + avh4/elm-format
    ● https://guide.elm-lang.org
    ● isRuslan/awesome-elm

    View Slide

  17. Thank you

    View Slide

  18. Questions?

    View Slide

  19. Jobandtalent, September 2017

    View Slide