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

Quiz: Markdown without dangerouslySetInnerHTML

Why does Crew Council render post bodies through react-markdown instead of marked and dangerouslySetInnerHTML?

Answer options

  • Because marked does not support lists or headings
  • Because react-markdown builds React elements and does not insert HTML from the content, so a script from a post will not run
  • Because dangerouslySetInnerHTML works only in Server Components
  • Because react-markdown itself saves posts in the database

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