Skip to content

App Router ignores reactStrictMode in next.config (Pages Router only today) #2676

Description

@314systems

Summary

reactStrictMode appears to be applied only for the Pages Router in vinext, but not for the App Router.

Based on current code/comments, this seems known internally (reactStrictMode is marked as partial), but I couldn't find a dedicated issue tracking App Router parity.

Current behavior

  • reactStrictMode: true enables StrictMode behavior for Pages Router client rendering.
  • App Router is not wrapped/enforced the same way, so StrictMode checks are not activated there.

Expected behavior

For Next.js parity, App Router should respect strict mode behavior as well (or document a clear intentional divergence).

Evidence

In packages/vinext/src/check.ts, reactStrictMode is explicitly marked as partial with detail similar to:

enforced for the Pages Router ... App Router is not yet wrapped (Next.js defaults App Router strict mode on)

Reproduction (high level)

  1. Create/use an App Router app on vinext.
  2. Set reactStrictMode: true in next.config.
  3. Add a small component that makes StrictMode dev behavior obvious (e.g. effect/log patterns).
  4. Compare with equivalent Pages Router setup and/or upstream Next.js behavior.

Questions

  1. Is this a known parity gap to be fixed?
  2. Should we track this as a dedicated compatibility issue?
  3. If intentional for now, can we document it more prominently in compatibility docs/check output?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions