How does react-native distinguish between different running environments (development / test / production / other custom environments)

for example, the only thing that can be used is not _ _ debug__
, which can only be used to determine whether it is a development environment or not. After packaging, it is not necessarily a production environment, it is likely to be test environment A / test environment B br. / test environment N < < package > so I wonder if there is a way to customize some packaging parameters

.

clipboard.png

clipboard.png

as shown in the figure, rootTag is a custom parameter. I just don"t know how appParameters got into
. Now the problem is
1. How to pass in
[my guess]
Packaging Command Custom Parameter name = corresponding value of Custom Parameter name
the following pseudo commands are my guess

build -customKey=customValue

seek the real command now

2. Suppose you successfully passed in how to receive

Jun.09,2021

cross-env NODE_ENV=RELEASE


https://stackoverflow.com/que.
this may be helpful to you, although I also use _ _ Dev__ to make the judgment, tried to use cross-env similar to the previous answer, but without success. If there is a good way to solve the problem, please share ~

Menu