EduFlow
React Fundamentals

Checkpoint: Components & Props

Five questions on this section. Answer all of them, then see your score and why each answer is right or wrong.

Question 1 of 5

<MovieCard title="Arrival" watched="false" /> shows the “Watched” badge, and the component uses {watched && <Badge />}. Why?

Question 2 of 5

The list renders, but the console warns “Each child in a list should have a unique key prop”. Where is the mistake?

JSX
function MovieItem({ movie }) {
  return <li key={movie.id}>{movie.title}</li>;
}

{movies.map((movie) => <MovieItem movie={movie} />)}
Question 3 of 5

You are building a Dialog with a title, any body content, and buttons that differ per use. Which API keeps Dialog simple and flexible?

Question 4 of 5

A movie has genres: ["drama", "sci-fi"], and genres never repeat within a movie. What is a good key when rendering them?

Question 5 of 5

A MovieTitle component should display its title prop in uppercase. Which version is correct?

5 questions unanswered