【发布时间】:2022-01-03 21:20:18
【问题描述】:
我正在尝试在 fract native 上使用 MQTT,因此当我尝试从已弃用的 react native 导入它时,我不得不在我的代码中使用 AsyncStorage。请帮忙。
import init from 'react-native-mqtt'
import { AsyncStorage } from 'react-native'
init({
size: 10000,
storageBackend: AsyncStorage,
defaultExpires: 1000 * 3600 * 24,
enableCache: true,
reconnect: true,
sync : {
}
});
【问题讨论】:
标签: reactjs react-native mqtt asyncstorage