Tagged articles
7 articles
Page 1 of 1
ByteFE
ByteFE
May 12, 2021 · Frontend Development

Using @vue/reactivity in React: Custom Hooks and HOC for Reactive State

This article demonstrates how to leverage the @vue/reactivity package inside React by creating a custom useReactive hook for function components and a reactiveHoc higher‑order component for class components, explaining the underlying concepts, implementation steps, and practical usage with full code examples.

Custom HooksFrontendHigher-Order Component
0 likes · 7 min read
Using @vue/reactivity in React: Custom Hooks and HOC for Reactive State
政采云技术
政采云技术
Nov 24, 2020 · Frontend Development

Blending React Hooks with Class Components: Practical Patterns and Code

This article explains why mixing React Hooks with existing Class Components is often necessary, compares three integration techniques—Render Props, Higher‑Order Components, and Ref forwarding with useImperativeHandle—provides complete code examples for each, and discusses current Hook limitations and future support.

Class ComponentHigher-Order ComponentHooks
0 likes · 11 min read
Blending React Hooks with Class Components: Practical Patterns and Code
QQ Music Frontend Team
QQ Music Frontend Team
Nov 9, 2019 · Frontend Development

5 Ways to Reuse and Extend React Component State Logic

This article explains five approaches—Mixins, Class Inheritance, Higher‑Order Components, Render Props, and Hooks—for reusing and extending state logic in React components, comparing their advantages, drawbacks, and providing code examples to illustrate each method.

Higher-Order ComponentHooksReAct
0 likes · 11 min read
5 Ways to Reuse and Extend React Component State Logic
MaoDou Frontend Team
MaoDou Frontend Team
Aug 9, 2018 · Frontend Development

Unlock React Power: Master Higher‑Order Components and Their Two Core Patterns

This article explains React higher‑order components, defining the pattern, distinguishing between props‑proxy and reverse‑inheritance implementations, and illustrating each with practical examples such as Ant Design’s Form.create and a loading wrapper, while discussing lifecycle handling and the advantages of reverse inheritance.

Higher-Order ComponentJavaScriptProps Proxy
0 likes · 3 min read
Unlock React Power: Master Higher‑Order Components and Their Two Core Patterns
Qunar Tech Salon
Qunar Tech Salon
Aug 4, 2017 · Frontend Development

Understanding and Implementing Higher-Order Components in React

This article explains the concept of higher‑order components (HOCs) in React, demonstrates basic and advanced implementations—including parameterized HOCs, display‑name handling, composition with compose, and practical examples such as loading and copy utilities—while comparing HOCs with parent components and recommending open‑source libraries.

DecoratorFrontendHigher-Order Component
0 likes · 10 min read
Understanding and Implementing Higher-Order Components in React