DEV Community

Discussion on: HOC pattern in Vue.js

Collapse
 
roggc profile image
roggc

The HOC pattern it is meant to implement logic and also customizes rendering. Let's say you have a HOC called withDraggable that implements logic for drag and drop in the web. So with that HOC you can convert any component into a draggable component without having to implement each time the logic for drag and drop. I have a post published about it if you are interested (React).