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)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay