Question · Vibe coding with Claude Code course · Module 3: Twitter clone
Props spread
The post object has the fields id, author, avatar, content and likes. What reaches the component when you write <Post {...post} />?
Answer options
- One prop named post with the whole object
- Only the fields from the PostProps interface, and the build rejects id
- All five fields as separate props, including id, which Post does not use
- A copy of the post object saved in the component's state
You can check the correct answer by solving this task in the CodeWorlds game.