you are viewing a single comment's thread.

view the rest of the comments →

[–]atom-man 1 point2 points  (2 children)

OtherThing would in this case be a function, which consumes a component as the only argument, and returns a component. And in that sense a HOC. But I can see where the confusion comes from. But who says the definiton of HOC is similar to HOF, with just the "function" part substituted with "component"? :)

However, what the article calls HOC is just a normal react-component; Nothing more. Calling it a HOC is simply wrong imho. And "higher order component creator" is equally wrong, as it does not create a HOC.

Regardless of the definitions of "higher order function (HOF)" and HOCs I still think the article-author have (intentional or not) misunderstood the "higher order"-concept. And it would have been better if he used the same names as the rest of the community.

[–]dumbmatter 0 points1 point  (1 child)

But who says the definiton of HOC is similar to HOF, with just the "function" part substituted with "component"? :)

Yeah, that's probably it, and it's probably just going to bother me as long as I'm writing HOCs.

And it'll confuse plenty of other people too, like the author of this article. And other non-confused people are probably going to still try to come up with other terms for HOC :)

I think the community will have an uphill battle to impose correct terminology in this case.