List of Movies Component
Recall that you need a component that lists all the available movies, that is, those that are in the database. Your users can then pick from that list a movie to watch.
Add a VideoList
component with the following content:
The properties that are passed are cloudinaryInstance
and movies
. The instance that resolves an image URL from its public ID while the movies
array is being iterated shows a list of movies in a six-column grid.
Take a close look at the img
tag:
A click
event is attached to each image. Clicking an image triggers an event called choose-movie
to the parent component with a payload of the selected movie.
Last updated