Home/Categories/Web 开发

Web 开发

Next.js、React、TypeScript、前端工程化

Collection

This collection features articles and community discussions in the Web 开发 space, focusing on real-world engineering scenarios, tool selection, practical paths, and risk boundaries.

The page is continuously updated and serves as a learning roadmap, technology selection reference, and technical review entry point.

@admin·11 min read·Web Development

CORS and CSP: Two Lines of Defense for Web Security

CORS and CSP sound similar but serve different purposes: CORS governs cross-origin reads, while CSP controls what a page may load. This guide covers simple requests, preflights, credentials, CSP source and inline-script restrictions, common pitfalls, and a production-ready set of security headers.

#React #DevOps♥ 1190 comments
@admin·15 min read·Web Development

Feature Toggle Patterns: Decoupling Deployment from Release

Code deployment is not feature release. Feature Toggles let you deploy code with functionality disabled and enable it when needed. This article covers four Toggle types (release, experiment, ops, and permission), implementation tiers, lifecycle cleanup, and the real costs of conditional complexity.

#TypeScript #DevOps♥ 1200 comments
@admin·10 min read·Web Development

React Form Best Practices

Forms are frontend's most tedious work: validation, error messages, dynamic fields, and submission. This article covers complete React form practices: React Hook Form vs. Formik, Zod validation, controlled vs. uncontrolled inputs, Server Actions, and handling complex array and nested data.

#React #TypeScript♥ 1220 comments
@admin·10 min read·Web Development

Progressive Web Apps (PWAs)

PWAs give web applications native capabilities such as offline access, desktop installation, Push notifications, and background synchronization. This article explains their three core components, implementation steps, and platform support in 2026, including Web Push on iOS.

#React #TypeScript♥ 1240 comments
@admin·9 min read·Web Development

API Rate Limiting Strategies In Depth: Algorithms and Implementation

Rate limiting is more than 'N requests per minute' — which algorithm (fixed window/sliding window/token bucket/leaky bucket), which dimension (IP/user/API key), where to store (memory/Redis), and what to return when exceeded (429/Retry-After) all matter.

#DevOps♥ 1250 comments
@admin·11 min read·Web Development

React Virtualization: Optimizing Large List Performance

Rendering 10,000 records freezes the page? A virtual list renders only the rows in view and swaps them dynamically as you scroll. This article explains window calculation and DOM reuse, how to use react-window and TanStack Virtual, when virtualization makes sense, and its tradeoffs for search, accessibility, and dynamic heights.

#React #TypeScript♥ 1270 comments
@admin·10 min read·Web Development

Web Components: Framework-Agnostic Component Standards

React and Vue components are tied to their frameworks. Web Components use browser-native Custom Elements, Shadow DOM, and HTML Templates for cross-framework reuse. This guide explains their APIs, tradeoffs, best use cases, cases to avoid, and how Lit improves the development experience.

#React #TypeScript♥ 1300 comments
@admin·10 min read·Web Development

React Data Fetching: From fetch to React Query

`useEffect + fetch` looks simple, but it is full of traps: races, duplicate requests, no cache, and no retries. This article traces React data fetching from `useEffect` to React Query/SWR and Server Components, explaining when to use each and why RSC and RQ complement rather than replace each other.

#Next.js #React♥ 1330 comments
@admin·11 min read·Web Development

WebAssembly: Near-Native Performance in the Browser

When JavaScript is too slow for image and video processing, 3D, cryptography, or heavy computation, WebAssembly lets browsers run code compiled from C or Rust at near-native speed. This article explains what WASM is, how it complements JavaScript, how to use it, and where it does and does not fit.

#AI #TypeScript♥ 1350 comments
@admin·11 min read·Web Development

React Code Splitting and Lazy Loading

Bundle everything into one JS file and make users download several MB before first paint? Split code by route or component into small chunks and load them only when needed. Learn React.lazy + Suspense, Next.js automatic splitting, route- vs component-level splitting, preloading, and why too many chunks can be slower.

#Next.js #React♥ 1380 comments
@admin·10 min read·Web Development

Web Vitals: Lab Data vs. Field Data

A high Lighthouse score does not guarantee a fast user experience. This article explains the gap between simulated lab data and real-user field data, why field results are authoritative, how to collect them with CrUX, the web-vitals library, and RUM, and when to use each data source.

#Next.js #React♥ 1410 comments