An Elm Primer for React Developers
/
Part II: The Outside World: Randomness, APIs, and JavaScript
/
Chapter 6: HTTP and Remote Data
Chapter 6: HTTP and Remote Data
https://leanpub.com/elm-for-react-devs
From Random.generate to Http.get
https://leanpub.com/elm-for-react-devs
Setting Up the Server
https://leanpub.com/elm-for-react-devs
Installing elm/http
https://leanpub.com/elm-for-react-devs
The Shape of HTTP in Elm
https://leanpub.com/elm-for-react-devs
Success | Loading | Error
https://leanpub.com/elm-for-react-devs
Creating the HTTP Request
https://leanpub.com/elm-for-react-devs
Updating init
https://leanpub.com/elm-for-react-devs
Refactoring the GotPhrase Message
https://leanpub.com/elm-for-react-devs
Handling Results in update
https://leanpub.com/elm-for-react-devs
Rendering Different States
https://leanpub.com/elm-for-react-devs
The Complete Code
https://leanpub.com/elm-for-react-devs
Commands Are Just Commands
https://leanpub.com/elm-for-react-devs
What You Just Learned
https://leanpub.com/elm-for-react-devs
The Pattern Continues
https://leanpub.com/elm-for-react-devs
Up next
Chapter 7: JSON Decoders and Type Safety
In this chapter
Chapter 6: HTTP and Remote Data
From Random.generate to Http.get
Setting Up the Server
Installing elm/http
The Shape of HTTP in Elm
Success | Loading | Error
Creating the HTTP Request
Updating init
Refactoring the GotPhrase Message
Handling Results in update
Rendering Different States
The Complete Code
Commands Are Just Commands
What You Just Learned