DEV Community

Discussion on: Data fetching React Hook

Collapse
 
mbellagamba profile image
Mirco Bellagamba

Thanks for the suggestion! Generally speaking, I prefer the hooks approach because it's more explicit, but it's just a matter a preference. With an HOC we also need to handle props collision, if the component needs to make 2 request. Anyway, I'll try to refactor the hook in a HOC to see if it's even more practical.