DEV Community

Cover image for Writing Effective Higher-Order Components in React.js
Slava
Slava

Posted on

Writing Effective Higher-Order Components in React.js

Many developers who experienced HOCs in the pre-hook era have been traumatized by the experience of data-provider HOCs and have stopped using them entirely as soon as they could.

I think that they were sworn off prematurely, and that there is room for them as long as you avoid using them in the wrong places.

I wrote a list of conventions to follow, and things to avoid in order to write HOCs effectively.

Read it here: https://www.bbss.dev/posts/effective-hocs/

Let me know what you think!

Top comments (0)