Home/Tags/React

#React

Collection

This aggregates CodeNodeX AI community articles and discussions related to React, covering concept explanations, tool comparisons, engineering practices, common issues, and indie hacking experience.

If you're researching React, start with high-quality long-form articles, then join post discussions for a complete understanding-to-practice path.

@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
@admin·16 min read·Web Development

Web Image Optimization: Formats, Responsive Images, and Lazy Loading

Images are often a page's largest resource, so optimizing them is key to LCP. This guide covers modern formats (WebP/AVIF vs. JPEG/PNG), responsive images (srcset/sizes), Next.js Image, lazy loading, placeholders, and dynamic CDN processing in a production-ready strategy.

#Next.js #React♥ 1640 comments
@admin·18 min read·Web Development

E2E Testing in Practice: Playwright

Unit tests validate individual units and integration tests validate combinations, but only E2E can answer whether users can actually use the product. This article covers Playwright's core capabilities, Page Objects, CI integration, and what E2E should and should not test.

#React #TypeScript♥ 1650 comments
@admin·16 min read·Web Development

React Portal: Modals, Tooltips, and Stacking Contexts

A modal rendered deep in a component tree can be clipped by parent z-index, overflow, or transform rules. Portal renders it in document.body to escape those constraints. Learn Portal fundamentals, a complete modal implementation, accessibility, and why Radix Dialog handles the hard parts.

#React #TypeScript♥ 1680 comments
@admin·16 min read·Web Development

Web Font Optimization: Loading, Rendering, and CLS

Custom fonts improve design but can slow LCP and cause CLS when loaded poorly. This guide covers the full optimization path: font-display strategies (swap, fallback, and optional), preloading critical fonts, WOFF2 subsetting, FOUT vs. FOIT, variable fonts, fallback metrics, and a practical setup that looks good and stays fast.

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

CSS Container Queries: True Component-Based Responsiveness

Media Queries respond to viewport width; Container Queries respond to the parent container's width, so a component adapts (different layouts in a narrow sidebar vs. a wide main area). This article covers the principles, the @container syntax, container-type settings, browser support, and how they reshape responsive design.

#React #TypeScript♥ 1750 comments
@admin·16 min read·Web Development

React Custom Hook Architecture: Extraction, Composition, and Testing

Hooks are more than useState/useEffect: custom Hooks are React's "unit of reuse." This article explains when to extract custom Hooks, how Hooks compose, dependency arrays and stale closures, testing with renderHook + act, and why not to over-abstract Hooks.

#React #TypeScript♥ 1770 comments
@admin·17 min read·Web Development

Visual Regression Testing: Screenshot Comparison and Noise Control

Functional tests do not catch broken layouts, changed colors, or incorrect font sizes; only visual regression testing can. This article explains VRT principles, screenshot and pixel diffs, Playwright, Chromatic, Percy, threshold tuning, CI integration, and how to prevent VRT from becoming a noise generator.

#React #TypeScript♥ 1810 comments