Question · Vibe coding with Claude Code course · Module 14: Pinterest clone
Quiz: State set during render
The agent's version calls setColumnHeights(heights) in a function that MasonryGrid calls in the component body. What will happen?
Answer options
- React renders the component over and over until it stops with a Too many re-renders error
- The column heights will be saved once and the page will work faster
- npx tsc --noEmit will reject the code with a type error
- React will ignore setState called during render
You can check the correct answer by solving this task in the CodeWorlds game.