Skip to content

reactStrictMode: true is recognized but not enforced (root not wrapped in <StrictMode>) #9

Description

@hyf0

Problem

reactStrictMode: true in next.config is recognized but not enforced — the app root is not wrapped in <React.StrictMode>.

npx vinext check even reports it:

~ reactStrictMode — config option recognized but not yet enforced; root is not wrapped in <React.StrictMode>

react.dev sets reactStrictMode: true. Under vinext the dev-time double-invoke / strict checks the project opted into are silently lost (production is unaffected — StrictMode is dev-only).

Workaround used

Wrap pages/_app.tsx's tree in <StrictMode> manually.

Suggested fix

Inject the <React.StrictMode> wrapper when reactStrictMode: true, like Next.js does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions