Reputation: 1759
I usually use @Input/@Output directives to share data between components with parent/child relationship. But I can also use observables like BehaviorSubject to subscribe and listen to observers, so I am confused if I should use obserbvales when I can use @Input and @Output directives.
Upvotes: 0
Views: 390
Reputation: 60558
It depends on the design patterns you prefer to follow.
If you follow a presentational/container component architecture, then you'll want to stick to @Input and @Output.
If you want to go with a declarative/reactive approach, then using Observables makes sense.
Upvotes: 2