Determine if in production or development environment


#1

Hi,

What is the recommended way to determine in my code if I’m running in development or production environment?

thanks


#2

You have the __DEV__ global variable, so things like:

if (__DEV__) {
  console.log('123');
}

work fine