Question · Vibe coding with Claude Code course · Module 3: Twitter clone
A ref instead of state
Claude replaced the draft state with useRef to save renders: the field is now uncontrolled, and the character counter reads draftRef.current. What will you see?
Answer options
- The counter works as before, just with fewer renders
- The build stops on a type error
- The counter stands still, because changing current does not refresh the screen
- The counter starts showing twice as many characters
You can check the correct answer by solving this task in the CodeWorlds game.