High-order component example does not return the enhanced component
dennisXZX opened this issue · 3 comments
dennisXZX commented
In the High-order example, it seems we forget to return the enhanced component.
var enhanceComponent = (Component) => {
class Enhance extends React.Component {
render () {
return (
<Component {...this.props} />
)
}
}
// should we return the component here?
return Enhance;
}
lnfnunes commented
Actually, the example don't have the brackets after the => as you mentioned
So, the class is being returned correctly by the arrow function!
@dennisXZX There are any other example that I didn´t find?
If not, I think you can close this issue...
krasimir commented
@infertux good call. I was going to work on this issue today but you were first. @dennisXZX is that example that you are referring to?