Question · Vibe coding with Claude Code course · Module 5: Reddit clone

Quiz: key on the search field

Why does the phrase field in SearchBar have key={query}?

Answer options

  • So that the browser remembers the phrase after the tab is closed
  • So that after the address changes, for example after clicking All, the field is drawn again with the phrase from the address
  • So that Form sends the phrase without pressing Enter
  • So that searchPosts ignores letter case

You can check the correct answer by solving this task in the CodeWorlds game.