Tag

useCallback

1 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
Jul 28, 2024 · Frontend Development

When to Drop useCallback and useMemo? A Practical React Performance Guide

Swizec Teller argues that in most React projects the useCallback and useMemo hooks are unnecessary, explains how they work, shows common pitfalls, and provides concrete alternatives for writing cleaner, more efficient components without over‑optimizing.

HooksReactfrontend
0 likes · 8 min read
When to Drop useCallback and useMemo? A Practical React Performance Guide
Code Mala Tang
Code Mala Tang
Jul 13, 2024 · Frontend Development

Why Do Some React Child Components Re‑Render While Others Don’t?

This article explains how parent and child components interact in React, why certain child components re‑render on state changes, and how techniques like React.memo, useCallback, and useMemo can be used to control rendering performance.

Component Re-renderingReactReact.memo
0 likes · 13 min read
Why Do Some React Child Components Re‑Render While Others Don’t?
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 Managementfrontend
0 likes · 20 min read
React Rendering Performance Optimization: Case Study and Practical Techniques
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 5, 2023 · Frontend Development

Understanding useCallback and Building a Custom Countdown Hook in React

This article explores the purpose and proper usage of React's useCallback hook, examines common pitfalls, and demonstrates how to build and enhance a reusable countdown custom hook, including handling callbacks, effect dependencies, and ref-based solutions for stable function references.

JavaScriptReactcustom hook
0 likes · 8 min read
Understanding useCallback and Building a Custom Countdown Hook in React
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Dec 9, 2021 · Frontend Development

Why Do Function Components Re‑Render? A Deep Dive into Hooks and Optimization

This article explains the three main reasons function components re‑render—useState/useReducer updates, parent updates, and context changes—and shows how to control unnecessary renders with techniques such as memoization, useCallback, useRef, and component extraction.

HooksReactReact.memo
0 likes · 12 min read
Why Do Function Components Re‑Render? A Deep Dive into Hooks and Optimization
ByteFE
ByteFE
Apr 26, 2021 · Frontend Development

Optimizing Long Page Rendering in React: Lazy Loading, Intersection Observer, and Memoization

This article explains how to improve performance of long React pages by rendering components screen‑by‑screen using viewport detection (getBoundingClientRect or Intersection Observer), grouping data, debouncing scroll handlers, and applying React.memo to prevent duplicate data requests.

Lazy LoadingReactReact.memo
0 likes · 9 min read
Optimizing Long Page Rendering in React: Lazy Loading, Intersection Observer, and Memoization
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Jul 11, 2019 · Frontend Development

Master React.memo, useCallback & useMemo to Supercharge Component Performance

This article explains how React.memo, its second‑argument comparator, and the related hooks useCallback and useMemo can be used to avoid unnecessary re‑renders, handle function props correctly, and dramatically improve rendering performance in complex functional components.

Reactfrontendmemo
0 likes · 10 min read
Master React.memo, useCallback & useMemo to Supercharge Component Performance