Tag

function components

1 views collected around this technical thread.

Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Feb 24, 2022 · Frontend Development

Why Function Components Had No State Before React 16 and How Hooks Changed That

This article explains why React function components were stateless before version 16, how the introduction of Fiber and the useState hook gave them state, and dives into the internal mechanisms—including renderWithHooks, hook queues, and update scheduling—that make state updates work in modern React.

FiberReact16State Management
0 likes · 18 min read
Why Function Components Had No State Before React 16 and How Hooks Changed That
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.

React.memofunction componentshooks
0 likes · 12 min read
Why Do Function Components Re‑Render? A Deep Dive into Hooks and Optimization