Test HOC with hooks API Example of High Order Component. A higher-order component (HOC) is an advanced technique in React for reusing component logic.