【发布时间】:2016-03-05 03:45:01
【问题描述】:
我尝试在 react native 上使用 await/async,但出现意外令牌错误。
我在我的 javascript 源文件中添加了代码:
var value = await AsyncStorage.getItem('STORAGE_KEY');
我的 react native 版本是 0.15.0。
是否需要添加一些配置才能使用 async/await?
【问题讨论】:
-
您是否尝试过将其包装在类似于文档的 try catch 块中?
-
@NaderDabit 我尝试将其包装在 try catch 中,但结果相同。
标签: react-native