当我在 react-native 中的现有项目中安装解析库时,它显示找不到变量:localStorage 错误并破坏了我的应用程序。
当我使用 install.save 方法时,它会显示错误。
let install = new Parse.Installation();
install.set("deviceType", navigator.userAgent);
install.save().then((resp) => {
console.log('Created install object', resp); })
this.setState({
result: 'New object created with objectId: ' + resp.id
})
},err => {
console.log('Error creating install object', err);
this.setState({
result: 'Failed to create new object, with error code: ' + err.message
})
})