【发布时间】:2017-02-28 18:23:43
【问题描述】:
我是 react 新手,我遵循了 React Native Docs 中关于集成现有应用程序的教程。
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 守护进程并希望呈现服务器返回的两个不同布局。
由于目前我只有一个,我该怎么做:
AppRegistry.registerComponent('HelloWorld', () => HelloWorld);
【问题讨论】:
标签: android facebook react-native