Performance: Component naming rules
LOW IMPACT
Component naming affects how React identifies and renders components, impacting developer experience and potential rendering optimizations.
function MyComponent() { return <div>Hello</div>; } export default MyComponent;
function mycomponent() { return <div>Hello</div>; } export default mycomponent;
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Lowercase component name | Creates extra DOM nodes as native elements | May trigger unnecessary reflows | Higher paint cost due to incorrect updates | [X] Bad |
| PascalCase component name | Creates virtual DOM nodes correctly | Minimal reflows due to optimized updates | Lower paint cost with proper reconciliation | [OK] Good |