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

React Design Patterns: The Art of Component Abstraction

How you split components, manage state, and reuse logic is determined by design patterns. This article explains common React patterns: container/presentational separation, custom Hooks, Render Props, Compound Components, and the Provider pattern, along with the problems each one solves.

#React #TypeScript♥ 1440 comments
@admin·11 min read·Web Development

Web Workers: Multithreading in the Browser

JavaScript is single-threaded, so heavy computation can freeze the UI. Web Workers run JavaScript on background threads without blocking the main thread. This article covers postMessage, CPU-intensive use cases, Dedicated, Shared, and Service Workers, transfer strategies, Comlink, and WASM integration.

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

Next.js App Router Deep Dive: Routing, Layouts, and Data Flow

The App Router is central to Next.js, yet many developers underuse nested layouts, parallel routes, intercepting routes, and dynamic segments. This article covers its file conventions, advanced routing patterns, Server/Client Component data flow, and the key differences when migrating from the Pages Router.

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

Practical Accessibility for React Components

Semantic HTML is not enough: custom React components such as modals, dropdowns, tabs, and toasts require explicit a11y handling for focus management, keyboard navigation, ARIA, and screen-reader announcements.

#React #TypeScript♥ 1500 comments
@admin·13 min read·Web Development

Web Performance Monitoring (RUM): From Collection to Alerts

Lighthouse only runs during development, but who watches real users in production? RUM (Real User Monitoring) collects real-user LCP, INP, CLS, and JavaScript errors. This article covers collection with the web-vitals library, reporting, dashboards, and alerts, turning "fast in the lab" into "fast for users."

#Next.js #React♥ 1530 comments
@admin·15 min read·Web Development

CSS Grid Mastery: From Two-Dimensional Layout to Practice

Flexbox is one-dimensional; Grid is two-dimensional—real page layout should use Grid. This article explains Grid's core concepts (rows/columns/areas/tracks), the fr unit and minmax, grid-template-areas semantic layout, responsive Grid (auto-fit/auto-fill), and Grid vs Flexbox tradeoffs, taking you from 'able to use Grid' to 'mastering Grid'.

#React #TypeScript♥ 1550 comments
@admin·6 min read·Web Development

Preview Environment Lifecycle: Isolated Seeds, Lease Fencing, and Destruction Proof

One Preview environment per PR is convenient, but it can easily reuse data, credentials, and stale deployments across environments. This article defines ephemeral environment identities, seed snapshots, monotonic leases, and destruction receipts so creation, retries, closure, and rollback are all verifiable.

#TypeScript #DevOps #Open Source♥ 1530 comments
@admin·20 min read·Web Development

React Concurrent Features in Depth: Suspense, Transitions, and useDeferredValue

React 18+ concurrent rendering is not multithreading; it is interruptible rendering. Learn Suspense for declarative loading states, useTransition for low-priority updates that do not block input, useDeferredValue for deferring expensive work, and how they keep React apps responsive.

#Next.js #React♥ 1560 comments
@admin·23 min read·Web Development

OAuth 2.0 PKCE and Token Rotation

The implicit flow is unsafe for SPAs and mobile apps; PKCE is now standard. This article explains PKCE (`code_verifier`/`code_challenge`), why it replaces the implicit flow, access and refresh token lifecycles, token rotation and revocation, and a production-grade OAuth client implementation.

#React #DevOps♥ 1610 comments