Back to search

Higher-order components, render props, and why hooks reduced their popularity

Before hooks, HOCs and render props were common ways to share stateful logic across components.

React Medium Theory

Higher-order components, render props, and why hooks reduced their popularity

Before hooks, HOCs and render props were common ways to share stateful logic across components.

  • HOCs wrap components
  • Render props pass behavior through a function prop
  • Hooks usually make logic reuse flatter and cleaner

Higher-order components, render props, and why hooks reduced their popularity