【发布时间】:2019-04-29 11:25:33
【问题描述】:
我的 app.js 文件中有这个函数:
codePush.getUpdateMetadata().then(update => {
if (update) {
Sentry.setVersion(update.appVersion + "-codepush:" + update.label);
// update.label
}
});
我想将 update.label 的值导出为字符串并在另一个类中调用它,以便我可以在屏幕上显示它的值。我是 React Native 的新手,不确定如何做到这一点。我如何将它从函数中传递出去?以及如何将它从课堂中传递出去,以便我可以导入到另一个课堂中?
非常感谢任何帮助
【问题讨论】:
标签: function react-native import export