InterviewBuddy
All interview questions

What is the difference between composition and inheritance in React?

Beginner

Answer

Composition combines components through props and children. React commonly uses composition to share UI behavior rather than deep component inheritance hierarchies.