I had someone mention these (HOCs) to me so I decided to give them a try! Cool stuff but as Micheal Jackson stated there is another way to do the same thing and this may not necessarily be the best way, render prop works too and would take the guess work out of where your props are coming from. However, HOCs do work. I would mostly use them in Redux with connect() and <Provider/>.
- clone this repo
- npm install at root
- use http://localhost:8080
- check out the heroku deployment here
I put a algorithm in this repo as well. It's just something that I was experimenting on while playing with HOCs. It works sometimes, but others it causes a stackoverflow! If you want take a look and if you figure the bug out submit a PR.
L8r!