evancz/elm-architecture-tutorial

Mentioning ports in the tutorial.

BenBals opened this issue · 5 comments

I am very new to Elm and have been stuck for some time on performing an http request. Maybe I am handling StartApp.start wrong or something, but as far as I have experienced you have to do the following in your Main.elm or where ever to actually have your effects performed:

port tasks: Signal (Task.Task Effects.Never ())
port tasks =
  app.tasks

Unfortunately this is noted nowhere in the Elm Architecture Tutorial and very difficult to guess from the Interops section at elm-lang.org. I only found it by browsing the source code for the example. It is possible that I did not read carefully enough, but a quick "hey, don't forget to set up a port for your effects to be actually performed" or something along the lines.

Thanks
Ben

See #60. Possibly close here?

That would solve it. Thanks.

I was confused by this too.

This is not a thing anymore in 0.17 and the guide lives at http://guide.elm-lang.org/

Sorry for the confusion!

Haven't read through the entire guide yet, but it seems incredibly awesome. I am very excited to see this very best language I've ever used mature and I hope it will become a widely accepted tool so I can use it for more than personal projects!