Composite pattern
Opened this issue · 0 comments
nhaouari commented
Thank you very much for this professional guide for design patterns.
I want to suggest a clearer definition Composite pattern:
Composite Pattern intent is to compose complex objects using other simpler objects into tree structures allowing the client(s) to treat these structures as if they were individual objects (Source: Mastering Javascript Design Third Edition)
Also, I think that the presented example does not reflect clearly this concept of compositions.
Best regards.