DEV Community

Discussion on: Render Props and Higher Order Components

Collapse
 
lucciddev profile image
lucciddev

Awesome post bro. I loved the way you dissected the topic. But is it a bad practice to use HOC instead of RP or can you use either based on the problem you are trying to solve? Sometimes I have component eg a page that is set to receive certain props when wrapped with a HOC so I just need to declare the page wrapped with the HOC as a component to be displayed for a certain route in my application. With this kind of example I don't think I need render props or what do you think? Would appreciate your view on this.