在App初始化之前,我需要阅读一些用户设置。此设置将更新应用程序的样式。
我调用AppRegistry.registerComponent时有些延迟,但应用程序崩溃了。在https://github.com/facebook/react-native/issues/17724上发现了此问题,但没有帮助。
答案 0 :(得分:0)
我找到了答案
AppRegistry.registerComponent("App", () => App);
AppRegistry.registerRunnable(appName, initParams => {
setTimeout(
() => AppRegistry.runApplication("App", initParams),
5000
);
});