No silly questions. Sure it will be possible. The point here is that several developers worked on the feature step by step. Each choose what it seems a good enough solution at the time and the code evolved slowly from one pattern to the other. The main take away here is to not freeze development by not deciding which pattern to use
Wouldn't going with Render Props from the beginning allow you to model the 3 use cases just as smoothly?
(Sorry if this is a silly question, I don't know React).
No silly questions. Sure it will be possible. The point here is that several developers worked on the feature step by step. Each choose what it seems a good enough solution at the time and the code evolved slowly from one pattern to the other. The main take away here is to not freeze development by not deciding which pattern to use
Got it, thanks for the reply!
Now, if you had to do it all over again, would you still contemplate HoCs or with the newly found experience would you go directly to Render Props?
Probably, having all this requirements first hand, I would go with render props. Only to use the same style and for mere personal taste.