What are React primitives vs feature components?
Primitives are reusable presentational components like Button, Input, Card, and Avatar, used across features. Feature components like Feed and ChatWindow hold the logic for a specific feature area. Primitives are bottom, features are middle.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in React Component Hierarchy Best Practices for UI Projects
Pages at the top per route, feature components in the middle like Feed and ProfileCard, and reusable primitives like Button and Card at the bottom. Data flows down via props and events up via callbacks, in one direction.
State that only one component needs stays local. State shared across siblings goes to the common parent. Do not lift everything to the top, which causes unnecessary re-renders across the tree.
When it does more than one thing. A card that handles its own data fetching and rendering is doing two things; split the fetching into a custom hook. Split by responsibility, not by line count.
Still have questions?
Browse all our FAQs or reach out to our support team
