hoc-pattern

Installation
SKILL.md

HOC Pattern

Table of Contents

Within our application, we often want to use the same logic in multiple components. This logic can include applying a certain styling to components, requiring authorization, or adding a global state.

One way of being able to reuse the same logic in multiple components, is by using the higher order component pattern. This pattern allows us to reuse component logic throughout our application.

When to Use

  • Use this when the same uncustomized behavior needs to be applied to many components
  • This is helpful when a component should work standalone without the added custom logic
Installs
557
GitHub Stars
231
First Seen
Mar 30, 2026
hoc-pattern — patternsdev/skills