Rendering

isDev

Edit this page

isDev is a constant boolean exported by solid-js/web.


Import

import { isDev } from "solid-js/web";

Type

const isDev: boolean;

Behavior

  • isDev is a bundle constant: it is true in the development browser bundle and false in production and server bundles. DEV is a separate development-only export from solid-js.
  • Because it is exported as a constant, bundlers can eliminate unreachable branches.

Examples

Basic usage

import { isDev } from "solid-js/web";
if (isDev) {
debugPanel.mount();
}

Report an issue with this page