We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15c1f00 commit 8459140Copy full SHA for 8459140
docs/hoc/index.md
@@ -11,6 +11,13 @@ title: HOC Cheatsheet
11
- Render props may be considered in the future
12
- The goal is to write HOCs that offer type safety while not getting in the way.
13
14
+There are a lot of use cases where an HOC is used. For example:
15
+
16
+- HOCs can wrap components to check if a user is authenticated before rendering, or to restrict access based on user roles.
17
+- An HOC can conditionally render components based on feature flags or A/B testing.
18
+- An HOC can provide translation functionality to components.
19
+- An HOC can add logging or analytics tracking to components without modifying their core logic.
20
21
Here is a base HOC example you can copy right away:
22
23
```jsx
0 commit comments