Google News
logo
Angular - Interview Questions
What is smart and dumb components?
A dumb component is not aware of what happens outside itself. It only receives input via property bindings and only emits output data as events.
 
Using smart and dumb components is a good practice. It greatly improves separation of concerns, making your application easier to understand and maintain. If your database or back-end API changes, you don’t have to worry about your dumb components. It also makes your dumb components more flexible, allowing you to reuse them more easily in different situations. If your application needs the same component twice, where one time it needs to write to a back-end database and another time it needs to write to an in-memory database, a dumb component allows you to accomplish exactly that.
Advertisement