Performance: Typing component props
LOW IMPACT
Typing component props affects development speed and runtime type checking but has minimal direct impact on page load or rendering performance.
const props = defineProps<{ title: string; count: number }>()export default { props: ['title', 'count'] }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Untyped props (string array) | 0 | 0 | 0 | [OK] Good for runtime but risky for bugs |
| Typed props with defineProps | 0 | 0 | 0 | [OK] Best for developer experience |