What is the difference between an HOC and a custom Hook?
The key difference is that HOCs wrap components from the outside, returning a new enhanced component, while custom Hooks are composed inside components through function calls. Hooks represent a more direct approach to reusing stateful logic without changing the component hierarchy.