我是新来做出反应的,我遵循关于整合在React Native Docs中打开的现有应用程序的教程。React Native:与现有应用程序集成
private ReactRootView mReactRootView;
.......
Bundle launchOptions = new Bundle();
launchOptions.putBoolean("test", true);
//mReactRootView.startReactApplication(mReactInstanceManager, "ThirdAwesomeComponent", launchOptions);
mReactRootView.startReactApplication(mReactInstanceManager, "ThirdAwesomeComponent", null); // Actual example
有没有办法在index.android.js
阅读了HelloWorld组件launchOptions?
另外我有两个活动,我需要调用react native守护进程,并且想呈现服务器返回的两个不同的布局。
我如何能做到这一点,因为目前我只有一个:
我怎样才能改变服务器的详细信息,如从Android原生应用主机和端口号,同时呼吁 mReactRootView.startReactApplication(mReactInstanceManager,“ThirdAwesomeComponent”,launchOptions); 例如,我想改变端口为8899和主机服务器。 – Shash
你是说网络服务器还是本地节点服务器?本地服务器可以改变使用http://stackoverflow.com/questions/34431052/react-native-change-listening-port我猜。我很不清楚你的服务器变化。提供更多关于您准确实施的信息的方便性? –