如何在 React Native 中设置 Staging、Development 和 Live Environment

How to set Staging, Development and Live Environment in React Native

我想在 React Native 中为 iOS 和 Android 平台设置暂存、实时和开发环境。我该怎么做?应用程序的结构应该是什么?

您绝对可以使用 react-native-config 库并为每个环境单独使用 .env 文件。这里有教程:https://dev.to/calintamas/how-to-manage-staging-and-production-environments-in-a-react-native-app-4naa.

https://itnext.io/the-easiest-way-to-setup-multiple-environments-on-react-native-67b33d073390

这也是一个很好的解决方案。