Edit this page

reactStrictMode

Environment: server, client
Cumulative: no
Global: no

Provided by: vike-react

You need to install vike-react to be able to use the reactStrictMode setting.

By default vike-react wraps your Page component with <StrictMode> but you can opt-out:

// /pages/+config.ts
 
import type { Config } from 'vike/types'
import vikeReact from 'vike-react/config'
 
export default {
  // Don't use <StrictMode>
  reactStrictMode: false,
  extends: [vikeReact]
} satisfies Config
⚠️

We recommend against opting-out of <StrictMode>: it ensures your app behaves as React expects which means much less potential bugs. (See React > <StrictMode>.)

See also