O'Reilly logo

Programming Elm by Jeremy Fairbank

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comment on Photos

In this section, you will take your knowledge of the Elm Architecture further and add another feature to the Picshare application. Any good photo sharing application not only allows you to like photos but also to leave comments on photos. In this section, you will work with input events and lists in order to add comments to photos. Let’s get started.

Update the Model

You’ll first need to update your model to store multiple comments. A list will be a natural fit. You’ll also need to add new comments to the list. As a teaser of what’s to come, know that you’re going to add an input element allowing a user to type in a new comment and save it. Because you’re using the Elm Architecture to handle state, you’ll need a way to temporarily ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required