3 ms·
Right but with recompose you get extra wrapping components in your tree which is what they were trying to avoid.
by sktrdie 8y ago
Right but with recompose you get extra wrapping components in your tree which is what they were trying to avoid.
- paultannenbaum 8y agoWhat '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.
- renke1 8y agoThe component tree.
- paultannenbaum 8y agoThen 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.