React · Junior · Question 65 of 75
What is the naming convention for props that accept event handlers?
<SearchBox onSearch={handleSearch} />- ✓Correct answer: Props start with
on(onSearch), and the handler functions often start withhandle - 2Props must start with
handle - 3There's no convention; any name is equally common
Explanation
Following the DOM's onClick style makes components feel familiar. The prop is just a function, so the name is up to you.