Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Frontend Development

10 min read

HarmonyOS Web Component Window Migration: 3 Steps for Seamless Multi-Window UX

This article explains how to migrate HarmonyOS Web components between windows using BuilderNode, NodeController, and NodeContainer, enabling browser-like tab drag-out/in experiences without recreating pages, while emphasizing the critical rule of removing before remounting to avoid unexpected behavior.

29 min read

Rslib 1.0: Build JS Libraries Faster with Module Federation & 4x Type Generation

Rslib 1.0 launches as a Rsbuild-based library development tool supporting ESM, CJS, UMD, and Module Federation outputs, with bundle/bundleless modes, 24-57% faster builds, 2.4-4.2x faster type generation via TypeScript 7 and Isolated Declarations, multi-framework support (React, Vue, Svelte, Solid), integrated styling/assets/Worker/Wasm handling, CLI and JS API, and Agent-friendly skills for AI-assisted development.

24 min read

Why `!b` Becomes `_a_b`: uni-app Compiler Bug with Variable `b`

The uni-app mini-program compiler (alpha) incorrectly replaces `!b` with undeclared `_a_b` when a local variable is named `b`, causing a runtime ReferenceError only when specific data triggers the condition; the bug evades build, TypeScript, and ESLint checks, and is fixed by renaming the variable.

24 min read

Vibe Coding a 3D Vue Component Library in 4 Days: Imagination Over Code

The author built vue-threeui, a Vue 3 component library with complex 3D visual effects, in four days using AI-assisted 'vibe coding', demonstrating how AI compresses the imagination-to-implementation cycle and shifts component library authors' competitive advantage from coding skill to design decomposition and visual judgment.

9 min read

shadcn's New `cn` Package: 30x Faster Drop-in Replacement for clsx + tailwind-merge

shadcn's new `cn` utility merges clsx and tailwind-merge into a single package, achieving up to 30x faster performance via compile-time optimization and multi-layer caching, with a 1.9 KB bundle size increase and a migration CLI for Tailwind CSS v4 projects.

9 min read

UI UX Pro Max: Open-Source AI Skill Generates Design Systems for 15+ Frontend Frameworks

UI UX Pro Max is an open-source AI design skill that equips coding assistants with professional UI/UX intelligence, automatically generating complete design systems — including 67 UI styles, 161 color schemes, 57 font pairings, 25 chart types, 99 UX guidelines, and 161 industry reasoning rules — across 15+ frontend frameworks and 8+ AI assistants like Claude Code and Cursor.

26 min read

HarmonyOS 7 Floating Tabs: Window-Width-Driven Layouts for Foldables & Tablets

This article demonstrates how to build responsive HarmonyOS 7 floating tab layouts that adapt to foldable phones, tablets, and split-screen windows by reading actual container width via ContainerReader, using breakpoints at 440/600/840 vp to switch column counts, preserving business state during layout changes, and avoiding device-type branching.

10 min read

Run WebGPU Shaders in Node.js Without a GPU Using Vercel’s Open‑Source VGPU

Vercel’s newly open‑sourced VGPU adds a TypeScript‑friendly layer to WebGPU, letting developers import WGSL modules, auto‑reflect bindings, and render shaders both in browsers and headless Node.js environments—even on machines without dedicated GPUs—using Dawn or a CPU software renderer.

4 min read

JPEG XL Finally Gains Cross‑Browser Support in Firefox and Chrome

Firefox 157 will enable JPEG XL decoding by default, Chrome plans to follow, and a new Rust‑based decoder addresses long‑standing memory‑safety concerns, while Mozilla’s docs compare JPEG XL with AVIF, highlighting lossless performance and progressive rendering advantages that could bring full cross‑browser support by year‑end.

12 min read

ArkWeb Performance Deep Dive: Load, Interaction & Frame Rate Optimization

This guide details ArkWeb performance optimization across four dimensions—page load, load completion delay, click response, and frame rate—using DevEco Profiler and DevTools to trace bottlenecks and apply techniques like pre-rendering, Code Cache, async JSBridge, and same-layer rendering for smooth HarmonyOS web experiences.

11 min read

When AI Generates Frontend Pages Like a Blind Box, I Built a Project Design Language Skill

The article explains how uncontrolled AI‑generated UI leads to inconsistent styles, proposes a project‑level design language documented in docs/design.md, details the tool’s extraction, reuse, refresh, apply, audit capabilities, shares pitfalls encountered, and outlines who can benefit from this approach.

11 min read

Mastering OAuth2 Login in the Frontend: Full Flowchart and Common Pitfalls

This article walks through the complete OAuth2 Authorization Code flow with PKCE for front‑end applications, explains each step with code examples, highlights six frequent pitfalls such as redirect_uri mismatches, missing state validation, PKCE requirements, one‑time code usage, URL leakage, and insecure token storage, and provides a ready‑to‑use implementation template.