I have been writing React code for long time, but when it come to choose Higher order Component(HOC) vs Parent component, i am not able to decide which one to choose, both seems to do same thing.
This article has a great section comparing the 2 in the section Appendix B: Difference with Parent Components
I'm still digging in to find out the core differences and when to use each as I have just been looking into this recently.
https://medium.com/@franleplant/react-higher-order-components-in-depth-cf9032ee6c3e
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With