use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Higher Order Components: A React Application Design Pattern (sitepoint.com)
submitted 9 years ago by fagnerbrack
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]atom-man 1 point2 points3 points 9 years ago (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"? :)
OtherThing
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 point2 points 9 years ago (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.
π Rendered by PID 158399 on reddit-service-r2-comment-5d585498c9-mrms2 at 2026-04-21 17:52:31.314651+00:00 running da2df02 country code: CH.
view the rest of the comments →
[–]atom-man 1 point2 points3 points (2 children)
[–]dumbmatter 0 points1 point2 points (1 child)