HOA — Higher Order Apps
See original GitHub issueHigher Order Apps refers to the following pattern, in which foo
, bar
and baz
are functions that take the app
function and transform custom props into props app can work with.
baz(bar(foo(app)))({
// Custom props!
})
or
app(baz(bar(foo({
// Custom props!
}))))
That isn’t bad, but this would be much nicer!
app(foo)(bar)(baz)({
// Custom props!
})
Now, that requires adding more bloat to core! 😭
So, what’s to do and can we find a middle ground?
Maybe!
compose(app)(foo)(bar)(baz)({
// Custom props & profit!
})
The compose
function can be implemented this way! ❤️
function compose(props, enhancers) {
return typeof props === "function"
? enhancer => compose(enhancer, (enhancers || []).concat(props))
: (enhancers || []).reduceRight((enhancer, reducer) => reducer(enhancer), props)
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:23 (18 by maintainers)
Top Results From Across the Web
The 33 Best HOA Software Solutions for Android 2022
Best HOA Apps for Android · PayHOA · AppFolio Property Manager · Buildium · Vantaca · Neigbrs · Wild Apricot · ONR app...
Read more >Homeowners' Association Software: the Best Options in 2022
Mobile app; Violations management; Architectural review request management; Timely financial reporting. 6) FRONTSTEPS. Frontsteps HOA Software.
Read more >Best HOA Apps for Android - 2022 Reviews & Comparison
Compare the Top HOA Apps for Android of 2022 · DoorLoop · Neigbrs by Vinteum · Raklet · Condo Control · Buildium ·...
Read more >Best HOA Software - 2023 Reviews, Pricing & Demos
HOA software is software that manages homeowner associations. Features include board meeting scheduling, recording meeting minutes, ...
Read more >Top HOA Software in 2022 - Slashdot
Find and compare the best HOA software in 2022 ; PayHOA. PayHOA, LLC. $49.00/month ; Condo Manager. Consultants Ingenium. $150.00/month/user. 2 Reviews ;...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think this talk is relevant. Michael Jackson (of React-Router), advising against Higher Order Components, and I agree with most of his points. The arguments could apply to higher order apps in
hyperapp
, in my opinion. https://www.youtube.com/watch?v=BcVAq3YFiucI’m not sure I see the point in supporting higher-order apps? Is there a particular use-case in mind for this?
As @okwolf mentioned, you have to worry about merging props correctly. It re-introduces what mixins were doing to begin with, which seem to be on their way out? I can’t keep up 😕
@jacktuck Mixins are just as evil. That’s why we are moving away from them in #219! 🏄