Skip to content

Instantly share code, notes, and snippets.

@binhtran04
Created April 3, 2020 13:27
Show Gist options
  • Save binhtran04/edf21f97d45052ecb4f5be3dc3567915 to your computer and use it in GitHub Desktop.
Save binhtran04/edf21f97d45052ecb4f5be3dc3567915 to your computer and use it in GitHub Desktop.
Movies component
import React from 'react';
import { Movie } from './Movie';
import { useMoviesContext } from './MoviesContext';
export const Movies = () => {
const { movies } = useMoviesContext();
return (
<section className="Movies">
<h2>My Movies</h2>
{movies.map(movie => (
<Movie key={movie.id} movie={movie} />
))}
</section>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment