Put in order · Vibe coding with Claude Code course · Module 4: Instagram clone
Sorting: Submitting a Comment
Arrange the steps of the handleSubmit function that submits a comment:
Items to put in order
- onAddComment(photo.id, text)
- setDraft("")
- event.preventDefault()
- const text = draft.trim(), and empty text ends the function
You can check the correct answer by solving this task in the CodeWorlds game.