DEV Community

Discussion on: React Context In Angular

wldomiciano profile image
Wellington Domiciano

Nice! Thanks for sharing.

As a suggestion, you could replace @Components with @Directive+<ng-container> to avoid inserting unnecessary elements into the DOM, what do you think?

ezzabuzaid profile image
ezzabuzaid Author • Edited on

The initial implementation was using directives only, put simply, components are more clear, more friendly if you well.

I don't understand exactly how directives over ng-container will work, but using attribute directives with elements can work just the same.