Tagged articles
Custom Hook
11 articles · Page 1 of 1
This article presents the Vue 3 custom hook useWatchFields, which lets developers monitor specific fields of a large reactive state object with flexible, lightweight, and optionally debounced change detection, simplifying code compared to traditional watch and computed APIs.
Custom HookState Managementwatch
0 likes · 7 min read

The article explains the difference between controlled and uncontrolled React components, introduces the usePropsValue custom hook to unify their handling, provides implementation details with code examples, and discusses optimization techniques to reduce unnecessary re-renders.
Controlled ComponentCustom HookReact
0 likes · 6 min read

This article explains the difference between controlled and uncontrolled components in React, illustrating when to use each approach, how defaultValue and value work, and provides practical code examples and a custom hook to support both modes in component development.
Controlled ComponentCustom HookReact
0 likes · 15 min read

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.
Custom HookJavaScriptfrontend
0 likes · 8 min read

This article explains why React's synchronous component model struggles with async data fetching, demonstrates how to cancel stale requests, introduces a refetch‑only hook, and shows how to implement caching and deduplication to make queries pure functions, while recommending React Query and SWR for production use.
CachingCustom HookReact
0 likes · 9 min read

This tutorial demonstrates how to use a previously built Web Components dropdown inside a React app, covering the creation of an abstraction layer, proper prop handling, event registration, and a reusable custom Hook that formats data and manages listeners.
Custom HookJavaScriptReact
0 likes · 15 min read

This article explains how to synchronize state across distant React components without relying on heavy libraries, using a custom hook and a publish‑subscribe model, and discusses optimizations such as avoiding redundant updates and incorporating a simple reducer for efficient change detection.
Custom HookReactRedux
0 likes · 7 min read

This article explains what race conditions are in front‑end web development, demonstrates the issue with a React demo fetching articles, and walks through step‑by‑step solutions using custom hooks, useEffect cleanup, and AbortController to safely cancel outdated requests and avoid stale data rendering.
AbortControllerCustom HookData Fetching
0 likes · 10 min read

Learn how to build a simple global state management solution in React using custom hooks, starting from a basic counter component, extending it with initialization props, synchronizing multiple counters, and finally creating a reusable createGlobalState utility for shared state across components.
Custom HookFrontend DevelopmentReact
0 likes · 9 min read

This article explores how classic design patterns and solid principles can be applied to React Hooks development, demonstrating with Context, custom global state, useState vs useReducer, and custom hook composition to improve code maintainability and reduce unnecessary re‑renders.
Custom HookState Managementhooks
0 likes · 16 min read


政采云技术Sep 8, 2019 · Frontend Development
This article introduces the concept of React Hooks, explains the built‑in hooks such as useState, useEffect, useCallback, useMemo, useRef, and useContext, demonstrates their usage with complete code examples, and guides readers on creating their own custom hooks for reusable logic in functional components.
Custom HookJavaScriptReact
0 likes · 15 min read
