HOC pattern inside your React app

How to reuse your logic and keep your code DRY

Jose Antonio Gonzalez Rodriguez
Level Up Coding
Published in
3 min readAug 22, 2021

--

Photo by Anton Darius on Unsplash

What is an HOC?

A higher-order component (HOC) is an advanced technique in React for reusing component logic. HOCs are not part of the React API, per se. They are a pattern that emerges from…

--

--

Mexican living in Porto Mexican living in Porto helping feed the world sustainably.