There is a problem in the react source code that is not a problem, but it is very confusing

Why is there a judgment statement like the following in the react source code? (if ("development"! = "production") {.}

clipboard.png

I can"t figure it out even though I"ve been going through it for most of the day. Is there any point in this? And the source code is full of this judgment.
react version 15.6

Jan.16,2022

these are compiled and generated, and only code that has not been confused is like this, and the code after UglifyJS processing will remove these. The real source code should be something like this:

if (process.env.NODE_ENV !== 'production'){}

this version of React defaults to development mode, and you need to specify NODE_ENV if you publish. In addition, you can dispose of the code through UglifyJS. Or you can directly refer to the confused code:

const React = require('react/dist/react.min.js');
For more information, please see https://github.com/facebook/r.

.

has two uses

  1. during official development, more debugging information is available for debugging. In production environment, it has generally been deleted
  2. .
  3. when we develop it, it is used as debugging and has more debugging information, but it is not recommended in production environment and has more consumption

We can also use this when we do our own development, output debugging information in the development environment, but no longer output some information in the production environment.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31887-2bd95.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31887-2bd95.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?