EduFlow
React Fundamentals

Final assessment

Twelve questions across the whole course. Score 70% or more to pass and unlock your certificate. You can retake it as often as you like.

Finish every lesson to earn the certificate — you can take the assessment any time.

Question 1 of 12

A component increments a module-level renderCount variable in its body and shows it. The number is different in development and production. Why?

Question 2 of 12

Which expression shows the text “Watched” only when movie.watched is true, and nothing otherwise?

Question 3 of 12

You type in a list row’s input, and it loses focus after every keystroke. The list uses key={Math.random()}. What is happening?

Question 4 of 12

Inside a click handler you call setFilter("watched") and then console.log(visible.length), where visible is derived from filter during render. What is logged?

Question 5 of 12

The Watchlist stores visibleMovies in state and updates it when the filter changes. Newly added movies do not appear until the filter is clicked again. What is the best fix?

Question 6 of 12

As soon as the page loads, React reports “Too many re-renders”. The list items contain <button onClick={handleRemove(movie.id)}>Remove</button>. What is the fix?

Question 7 of 12

A “Watched” checkbox is written as <input type="checkbox" value={watched} onChange={(e) => setWatched(e.target.value)} />. Clicking it never shows a check mark. What is wrong?

Question 8 of 12

The Watchlist loads saved movies in useEffect(() => setMovies(load()), []) and saves them in another Effect on [movies]. Users report their list is sometimes wiped on reload. What is the better design?

Question 9 of 12

AddMovieForm keeps the typed title in its own state; App owns the movies. Where should the “clear the field after adding” logic live?

Question 10 of 12

You want the active filter button styled differently, and you already set aria-pressed={value === key} on each one. Which Tailwind approach fits best?

Question 11 of 12

Your app calls a paid movie API with import.meta.env.VITE_MOVIE_API_SECRET. Why is this a problem?

Question 12 of 12

You extract a Card component that renders a border, padding and {children}, and use it for movie items and the empty state. What is the main benefit?

12 questions unanswered