Higher-Order Components in Vue.js
Pablo Henrique P. Silva

Usually the HOC pattern is used to share common functionalities across multiple components.
In your example, the HHC component is too coupled with the specific ‘ProductItem’ component, and for this reason is not easily reusable.
With few changes, you could make your high order component, more generic (passing the component to extend as argument to a factory function, for example).

Like what you read? Give Piero Maltese a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.