DEV Community


Discussion on: #6 of 100DaysOfCode

spino233 profile image
Angelo Caci • Edited

Hi, I think that your code example is good but not your explanation.

HOC(High order components) is an implementation of the decorator design pattern which consist in a component, that takes another component as parameter and return a new enanched component. In a nutshell, it adds logic(or behaviour) to the passed components without modifying it and its existent logic.

Whatever, thank you for your posts. I find it really funny and useful.

icecoffee profile image
atulit023 Author

😄 Thanks . I guess I was so busy admiring closures that I forgot about the main part.
I loved your defination.
Glad you liked it.

Forem Open with the Forem app