dwyl / learn-elm

:rainbow: discover the beautiful programming language that makes front-end web apps a joy to build and maintain!
https://github.com/dwyl/learn-elm
478 stars 40 forks source link

Add section about Elm flags #67

Closed naazy closed 6 years ago

naazy commented 7 years ago

Flags are really useful to pass data from JS to your Elm init function to produce the initial state. I think it would be useful to write up a small piece on flags with a simple example.

http://stackoverflow.com/documentation/elm/3771/the-elm-architecture#t=201702261950413123149

gabrielperales commented 7 years ago

I found this article talking about how to pass environment variables to elm with webpack and flags. I hope it can be useful.

iteles commented 6 years ago

Thanks @naazy ! This was added in the PR referenced above.