Hacker News new | past | comments | ask | show | jobs | submit login

Right but with recompose you get extra wrapping components in your tree which is what they were trying to avoid.



What 'tree' are you referring to? Higher order components are just functional components that accept a component as a argument and return a new component. There aren't any additional nodes added to your VDOM unless you specifically make a HOC that does that.


The component tree.


Then yeah you are incorrect. You are not adding any additional components to the tree. Higher order components are just a design pattern. How you implement that pattern will decide on the component tree, but there is no additional "wrapping" penalty for using them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: