All three share logic between components, but they evolved over time and custom hooks are the modern default for sharing logic.
Higher-Order Component (HOC)
A function that takes a component and returns an enhanced one:
jsx
= => {
user = ();
user ? : ;
};
= ();
