Skip to content

Instantly share code, notes, and snippets.

@bradwestfall
bradwestfall / HoC-vs-RenderProps-vs-Hooks.md
Last active September 10, 2025 20:18
An explanation of why Hooks are a nicer way to abstract re-useable state and functionality vs HoC's and Render Props

HoC (pattern) vs Render Props (pattern) vs Hooks (not pattern, a new API)

Someone was asking me about comparing the HoC and Render Props patterns (and their shortcomings) to hooks. I might leave this up as a public gist for others if it's helpful.


tldr;

Issues with HoC: