Higher Order Components in a React Hooks World

Photo by Franck V. on Unsplash

For most people working with regularly with React, it’s hard to go very far without encountering higher-order components (or HoC’s). To the uninitiated, it is a pattern that leverages React’s compositional nature to allow for code reuse across different components. Even if you haven’t written any yourself, chances are likely that you too are using them in some capacity without even realizing it.