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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access