arrangeactassert.com
Choosing Your React Framework in 2025: Understanding Next.js ...
Complaints: - Hard to test. - Hard to debug. - Hard to reason about. - Confusing mental model. - Seems designed to sell Vercel. - Some think only Next.js supports RSC. - More complexity for little benefit. pic.twitter.com/HT5DzXlK3t ## Middleware Issues ### Edge Runtime Limitations **Restricted Node.js API usage:** The Next.js Edge Runtime explicitly excludes many native Node.js APIs (such as `fs`, `net`, etc.), making tasks like direct database connections or session management impossible in middleware. *Verified by the official documentation:* Vercel's Edge Middleware Limitations and the Next.js Edge Runtime API Reference. … ### Single Middleware File Restriction **Single entry point:** Next.js supports only one middleware file (typically `middleware.ts`or `middleware.js`placed in the project root or within the `src`directory). This forces developers to consolidate all middleware logic into one file. Although not exhaustively documented in a single article, this constraint is implicit in the official Next.js Middleware docs and has been noted in various user reports. Having to use matches and then manually filter is a horrible developer experience. ## Implementation Problems ### Inconsistent Execution **Middleware Execution Issues:** In GitHub Issue #58025, users reported that middleware sometimes doesn't execute as expected in Next.js v14.2.4, occasionally requiring a hard refresh to function correctly. While this isn't solely a file placement issue, it underscores the importance of proper middleware configuration. **Redirect Behavior in Middleware:** GitHub Issue #59218 discusses problems with middleware redirects, where users experienced unexpected behaviour due to browser caching. This highlights the need for careful implementation and a thorough understanding of middleware behaviour. ### Authentication Compatibility **Challenges with authentication libraries:** Libraries like NextAuth.js have noted issues when used in middleware—largely because the Edge Runtime lacks certain Node.js APIs (e.g., Node's `crypto`module) required by these libraries. *For more details, refer to the Next.js Edge Runtime API Reference.* ## Fetch API and Monkey Patching Issues ### Global Fetch Modifications **Next.js extends the Web** `fetch`: Next.js extends the standard Web `fetch()`API to allow each server-side request to set its persistent caching and revalidation semantics. More details are provided in the Next.js fetch documentation. **Memory leaks and compatibility issues:** Modifications to the global … ## Backward Compatibility Bloat **Legacy systems maintained alongside new features:** Next.js continues to support legacy systems (e.g., the Pages Router and Babel) even as it introduces new paradigms like the App Router. This coexistence increases overall complexity. Official Next.js Pages Documentation. **SWC vs. Babel compatibility:** Although Next.js introduced the SWC compiler for performance improvements, Babel compatibility is still maintained—which adds to the bloat. Next.js 12 Blog on SWC. … ## Development Experience Issues ### Caching Complexities **Inconsistent caching behavior:** Next.js 14's aggressive caching sometimes led to stale data. Although Next.js 15 disabled caching by default to address these complaints, new issues have emerged in some cases. See community threads on GitHub discussions. ### Architectural Challenges **Hydration mismatches in Server Components:** Blending server and client components can lead to hydration mismatches that are challenging to debug. Next.js Server Components Documentation. **Mandatory file-based routing quirks:** The requirement that each page have a `page.tsx`file can be confusing and may lead to accidental bundling of server-only code into client bundles. Official Next.js Pages Documentation. ### Upgrades and Dependency Issues **Dependency conflicts during upgrades:** Some users have experienced issues when migrating between major versions (e.g., from Next.js 14 to 15), especially as many libraries are still catching up with changes introduced in React 19. In some cases, developers have resorted to workarounds like running
Related Pain Points11件
Middleware runs in restricted hybrid runtime with limited APIs
7Next.js middleware executes in a hybrid runtime that supports only a restricted subset of Web APIs and Node.js, preventing direct database connections, file system access, and session management. This awkward middle ground doesn't align with common development patterns.
Hydration mismatches and runtime instability in Next.js 16
7Next.js 16 introduces hydration errors where client-side reconciliation doesn't match server-rendered HTML, causing flicker, broken interactivity, and console warnings. This issue is particularly prevalent with the new Server Component paradigm.
Frequent breaking changes and rapid major version releases create maintenance burden
6Next.js has introduced 15 major versions in 8 years, each potentially containing backwards-incompatible changes. This creates significant maintenance burdens for long-term projects and makes it difficult for teams to keep applications updated.
Middleware execution inconsistencies requiring hard refresh
6Next.js middleware sometimes fails to execute as expected, occasionally requiring a hard page refresh to function correctly. This unpredictable behavior creates debugging challenges and unreliable application behavior.
Global fetch API modifications causing memory leaks and compatibility issues
6Next.js extends the standard Web fetch() API with proprietary caching and revalidation semantics, introducing memory leaks and compatibility issues. These monkey-patched modifications can conflict with libraries and cause unexpected behavior.
Steep learning curve requires mastering multiple Next.js subsystems
6Learning Next.js requires mastering not just React, but also its routing model, rendering modes, proprietary caching behavior, deployment quirks, and middleware runtime. This multi-layered complexity creates a steep onboarding barrier for newcomers.
Aggressive caching behavior causing stale data
6Next.js 14 implemented aggressive default caching that led to stale data being served to users. While Next.js 15 disabled caching by default, this created a pendulum effect with new issues emerging in some cases.
Documentation requires constant reference and is sprawling
6Next.js documentation has evolved from a quick reference to a sprawling, inconsistent guide that developers must keep open constantly. The docs present many 'old vs new' decisions (App Router vs Pages Router, getServerSideProps vs server components) without clear guidance, requiring extensive time to understand framework decisions.
Framework perceived as overengineered for complexity added
5Many developers perceive Next.js as overengineered, adding unnecessary complexity without proportional benefits. The framework's architectural decisions and accumulated features create bloat that doesn't serve most use cases.
Mandatory file-based routing causing accidental code bundling
5The requirement that each page must have a page.tsx file can be confusing and may inadvertently lead to server-only code being bundled into client bundles, creating security and performance issues.
Middleware limitations with single file requirement and complex chaining
5Next.js middleware has significant limitations, including a single middleware file requirement and complex chaining patterns that make routing and request handling difficult compared to traditional frameworks.