Hierarchical composition

A composed component has a parental relationship with another component, either as the parent or as a child. There is a tendency for a nested chain; hence, nothing stops a child component from having a grandparent or a parent component from having a grandchild component.

The following screenshot illustrates this better:

Here, the entry App component has two child components: CommentList and CommentForm. CommentList also has a child, CommentItem. It's okay to say that CommentItem is the grandchild of App. It's also okay to say that CommentList and CommentForm are siblings.

The thick arrows show how the data flows from ...

Get TypeScript 2.x for Angular Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.