Vue · Junior · Question 63 of 75
How should a prop declared as userName be written in a parent template?
- ✓Correct answer:
user-name="..."is the convention (camelCase also works in SFC templates) - 2Only
username - 3Only
USER_NAME
Explanation
Props are declared in camelCase in JavaScript, and kebab-case in templates matches HTML attribute conventions.