DEV Community 👩‍💻👨‍💻

Discussion on: 7 code smells in your React components

awnton profile image
Anton Gunnarsson Author • Edited on


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 ^^