【发布时间】:2020-08-21 15:24:09
【问题描述】:
我需要在运行其他函数之前先运行 AsyncStorage,但是 AsyncStorage 需要一些时间才能运行,它会在代码末尾给出结果
constructor(props) {
super(props);
AsyncStorage.getItem(TOKEN).then((r) => {
console.log("AsyncStorage Function")
})
this.state = { token: null }
console.log("The last Function")
}
【问题讨论】:
标签: reactjs react-native