DEV Community

loading...

Discussion on: 7 code smells in your React components

Collapse
awnton profile image
Anton Gunnarsson Author • Edited

Thanks!

If it works it's works, so to speak :) Your example is close to writing a Higher-order component but it depends on the use case. A lot of HOCs use cases however (just as render props) have been replaced by hooks instead, and should probably be the default moving forward unless you have a special use case ^^