Tag

Hooks

0 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Mar 26, 2025 · Frontend Development

React TypeScript Development Guide: Components, Hooks, Events, and Asynchronous Requests

This comprehensive React‑TypeScript guide walks developers through type‑safe component declarations—including functional, class, and generic patterns—hooks usage, event handling, element typing, error boundaries, and both fetch and Axios asynchronous request wrappers, emphasizing best practices for readability, maintainability, and performance.

Async RequestsComponentsError Handling
0 likes · 23 min read
React TypeScript Development Guide: Components, Hooks, Events, and Asynchronous Requests
Code Mala Tang
Code Mala Tang
Mar 19, 2025 · Frontend Development

When useState Becomes a Trap: Why useReducer Is the Better Choice

This article explains why overusing useState in complex React components can lead to tangled code and bugs, and demonstrates how switching to useReducer provides a single source of truth, clearer actions, and more maintainable state management.

HooksReactfrontend
0 likes · 12 min read
When useState Becomes a Trap: Why useReducer Is the Better Choice
Sohu Tech Products
Sohu Tech Products
Feb 19, 2025 · Frontend Development

Comprehensive Guide to React State Management

This guide explains React state management fundamentals, covering local state with useState, useReducer, class components, and custom hooks; global solutions such as Context API, Zustand, Jotai, and Redux; and server‑side handling using React Query, SWR, plus navigation and form state best practices.

Context APICustom HooksForms
0 likes · 30 min read
Comprehensive Guide to React State Management
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 8, 2025 · Frontend Development

Understanding Vue Hooks: From Vue 2 to Vue 3 and Practical Applications

This article explains the evolution of Vue development, introduces Vue Hooks as the core of the Composition API, demonstrates their advantages over Mixins with clear code examples, and provides best‑practice guidelines and common pitfalls for building maintainable, reusable front‑end components.

Composition APIHooksJavaScript
0 likes · 14 min read
Understanding Vue Hooks: From Vue 2 to Vue 3 and Practical Applications
Python Programming Learning Circle
Python Programming Learning Circle
Feb 7, 2025 · Information Security

Implementing a Windows Keylogger in Python Using Win32 API Hooks

This tutorial explains how to build a Python-based keylogger on Windows by importing win32 API DLLs with ctypes, registering low‑level keyboard hooks, defining hook procedures using WINFUNCTYPE, handling hook events, and properly installing and uninstalling the hook, complete with full source code.

HooksKeyloggerPython
0 likes · 7 min read
Implementing a Windows Keylogger in Python Using Win32 API Hooks
Sohu Tech Products
Sohu Tech Products
Jan 22, 2025 · Frontend Development

Comprehensive Guide to State Management in React

This guide explains React’s various state types—local, class, global, navigation, form, and persistent—showing how to manage each with built‑in hooks, Context, libraries such as Zustand, Jotai, React Query, SWR, React Router, TanStack Router, React Hook Form, Formik, and persistence tools like localStorage and redux‑persist.

Context APIForm HandlingHooks
0 likes · 36 min read
Comprehensive Guide to State Management in React
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 8, 2025 · Frontend Development

Understanding useEffect Execution Mechanism and Cleanup in React

This article explains the purpose of React's useEffect hook, details how dependency arrays control its execution timing, demonstrates cleanup functions, and provides practical code examples for handling side effects such as data fetching, timers, and event listeners.

HooksJavaScriptReact
0 likes · 7 min read
Understanding useEffect Execution Mechanism and Cleanup in React
Python Programming Learning Circle
Python Programming Learning Circle
Jan 3, 2025 · Artificial Intelligence

Visualizing Convolutional Neural Network Features with 40 Lines of Python Code

This article demonstrates how to visualize convolutional features of a VGG‑16 network using only about 40 lines of Python code, explains the underlying concepts, walks through generating patterns by maximizing filter activations, and provides a complete implementation with hooks, loss functions, and multi‑scale optimization.

CNNFeature VisualizationHooks
0 likes · 15 min read
Visualizing Convolutional Neural Network Features with 40 Lines of Python Code
Code Mala Tang
Code Mala Tang
Dec 12, 2024 · Frontend Development

Master URL State Management in React with Nuqs: A Complete Guide

This article introduces the Nuqs library for React, explaining how it synchronizes application state with the browser URL, outlines its key features, provides step‑by‑step installation and usage examples—including query hooks, type‑safe parsers, transition handling, multiple query states, and server‑side parsing—enabling developers to build more intuitive front‑end applications.

HooksNuqsReact
0 likes · 7 min read
Master URL State Management in React with Nuqs: A Complete Guide
IT Services Circle
IT Services Circle
Dec 7, 2024 · Frontend Development

React 19 New Features and Updates Overview

React 19 introduces a suite of new features including Actions with useActionState, optimistic UI with useOptimistic, the use hook for resource reading, enhanced form handling via useFormStatus, server components, static rendering APIs, improved hydration, ref-as-prop, metadata handling, stylesheet and async script support, and advanced resource preloading.

HooksPerformanceReact
0 likes · 20 min read
React 19 New Features and Updates Overview
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 26, 2024 · Frontend Development

Implementing a Vue Hook for Virtual List Rendering to Optimize Large Data Tables

This article explains how to create a reusable Vue hook that implements a virtual list, enabling efficient rendering of tens of thousands of rows by rendering only the visible items and handling both fixed‑height and variable‑height scenarios with caching and scroll calculations.

HooksInfinite ScrollVue
0 likes · 14 min read
Implementing a Vue Hook for Virtual List Rendering to Optimize Large Data Tables
Java Tech Enthusiast
Java Tech Enthusiast
Nov 25, 2024 · Frontend Development

Understanding Vue Composables (Hooks) and Their Usage

Vue’s reusable logic pattern, called Composables, are functions built with the Composition API that encapsulate reactive state via ref and lifecycle hooks, follow a use‑prefix naming convention, and let developers like the mouse‑tracker example share stateful behavior across components cleanly.

ComposablesComposition APIHooks
0 likes · 5 min read
Understanding Vue Composables (Hooks) and Their Usage
Code Mala Tang
Code Mala Tang
Oct 23, 2024 · Frontend Development

Master the Top 7 React Concepts to Join the Elite 5% of Developers

This article explores seven essential React concepts—including component lifecycle, advanced Hooks, virtual DOM, state management with Context and Redux, Refs, prop‑drilling solutions, and the new Suspense and Concurrent Mode—to help developers boost performance, scalability, and expertise.

HooksReactVirtual DOM
0 likes · 9 min read
Master the Top 7 React Concepts to Join the Elite 5% of Developers
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 3, 2024 · Frontend Development

Using and Building Custom Hooks in Vue 3

This article explains what Hooks are, demonstrates how to use them in Vue 3, and guides readers through building reusable custom Hook functions such as useMouse and useTable, covering pagination, parameter handling, and best practices for clean, maintainable frontend code.

Composition APIHooksJavaScript
0 likes · 23 min read
Using and Building Custom Hooks in Vue 3
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 28, 2024 · Mobile Development

Creating a Falling Confetti Effect in Flutter

This article explains how to build an eye‑catching falling confetti animation in Flutter by defining a ConfettiPiece class, using HookWidget for state management, CustomPaint for rendering, LayoutBuilder for responsive sizing, and a periodic timer to animate the pieces, with customizable parameters for color, size, and speed.

ConfettiCustomPaintFlutter
0 likes · 9 min read
Creating a Falling Confetti Effect in Flutter
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.

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

Inside Zustand: How Its Core Store and Hooks Are Built for React

This article dissects the lightweight Zustand state‑management library for React, covering its project layout, core store implementation, the createStore API, the useStore hook, middleware integration, and data‑flow mechanics that enable high‑performance, flexible state handling.

HooksJavaScriptReact
0 likes · 10 min read
Inside Zustand: How Its Core Store and Hooks Are Built for React
Code Mala Tang
Code Mala Tang
Jul 12, 2024 · Frontend Development

Mastering React Component Communication: 7 Essential Techniques

Explore seven core methods for React component communication—including Props, State Lifting, Context, Refs, Hooks, Event Emitters, and Redux—detailing practical code examples, key considerations, and best practices to help developers choose the optimal approach for various application scenarios.

Component CommunicationHooksProps
0 likes · 16 min read
Mastering React Component Communication: 7 Essential Techniques
Java Tech Enthusiast
Java Tech Enthusiast
Jun 1, 2024 · Information Security

Git CVE-2024-32002 Remote Code Execution Vulnerability Analysis

The article examines Git CVE‑2024‑32002, a remote‑code‑execution flaw that lets attackers run malicious code simply by cloning a crafted repository, exploiting Git hooks, submodules and case‑insensitive symbolic‑link tricks, and advises users to verify their Git version and update to mitigate the risk.

CVE-2024-32002GitHooks
0 likes · 9 min read
Git CVE-2024-32002 Remote Code Execution Vulnerability Analysis
Java Tech Enthusiast
Java Tech Enthusiast
May 28, 2024 · Information Security

Remote Code Execution Vulnerability in Git (CVE-2024-32002) Explained

Git’s CVE‑2024‑32002 is a critical remote‑code‑execution flaw where a malicious repository can exploit hooks, submodules, and symlinks on case‑insensitive file systems to inject and run attacker‑controlled scripts during a recursive clone, affecting versions up to 2.45.0 and mitigated by disabling recursive submodule fetching, avoiding untrusted clones, and updating Git.

CVE-2024-32002GitHooks
0 likes · 9 min read
Remote Code Execution Vulnerability in Git (CVE-2024-32002) Explained