Tagged articles
7 articles
Page 1 of 1
DaTaobao Tech
DaTaobao Tech
Sep 4, 2024 · Frontend Development

Best Practices for Component Design and Encapsulation in React

The article outlines React component design best practices by distinguishing generic UI components from business‑specific ones, separating UI and domain state, extracting reusable base components, applying patterns such as state lifting, context, memoization, and type‑safe props, and providing a checklist for clean encapsulation.

Component DesignDDDEncapsulation
0 likes · 10 min read
Best Practices for Component Design and Encapsulation in React
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 13, 2024 · Frontend Development

React Rendering Performance Optimization: Case Study and Practical Techniques

This article explains common React performance‑optimization methods, walks through a real‑world form‑editor use case, details the profiling, diagnosis, and step‑by‑step improvements—including memoization, callback stabilization, diff filtering, and pure‑function components—that reduced render time from 195 ms to under 10 ms.

ReactState Managementmemo
0 likes · 20 min read
React Rendering Performance Optimization: Case Study and Practical Techniques
Huolala Tech
Huolala Tech
Feb 14, 2023 · Frontend Development

When Does a React Component Re‑Render and How to Optimize It?

This article explains what triggers a React component re‑render, distinguishes required from unnecessary renders, and presents practical techniques—such as narrowing render scope, using memo, useMemo, useCallback, and context selectors—to improve performance in complex applications.

Reacthooksmemo
0 likes · 11 min read
When Does a React Component Re‑Render and How to Optimize It?
KooFE Frontend Team
KooFE Frontend Team
Aug 14, 2022 · Frontend Development

Mastering React Re-renders: When, Why, and How to Optimize Performance

This comprehensive guide explains what React re‑renders are, distinguishes necessary from unnecessary re‑renders, outlines the four triggers—state, parent re‑render, context, and hooks—and provides practical patterns and anti‑patterns, including memoization, useMemo/useCallback, and key management, to improve component performance.

KEYReactcontext
0 likes · 15 min read
Mastering React Re-renders: When, Why, and How to Optimize Performance
QQ Music Frontend Team
QQ Music Frontend Team
Oct 20, 2019 · Frontend Development

When Should You Use Class, Functional, or Pure Components in React?

This article explains the differences between React class components, functional (stateless) components, and PureComponent, shows their source code, discusses shallow equality checks, introduces the memo higher‑order component, and provides practical guidelines for choosing the right component type to improve performance.

Class ComponentFunctional ComponentPureComponent
0 likes · 10 min read
When Should You Use Class, Functional, or Pure Components in React?