DEV Community

Discussion on: Refactoring Higher-Order Components (HOC) to React Hooks

Collapse
 
jaimesangcap profile image
Jaime Sangcap

Isn't it the same when using HOC? When HOC change, you have to replace all calls to it? Well it just happens not inside the component. But it's most likely on the same file.

Collapse
 
ahmdgeek profile image
Ahmed Ali Tanany

I think the @amitnovick comment focuses on props interface HOC provides. So, the wrapped component cares only about the props being passed, from where it doesn't matter. So, if you changed a HOC, you still able to pass the same props to the wrapped component without this HOC.