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 ...
Get Programming Elm now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.