到目前为止,我已设法登录到cognito并同步数据,但我仍然坚持签署用户.能够从身份提供商退出,但再次登录到cognito时,我收到无效登录错误.当我重新加载应用程序虽然它工作.
是本机反应的新手,尝试访问远程URL会引发此错误。“未定义不是函数求值((0,_reactNative.fetch)”。不确定做错了什么;请提供帮助。我正在使用最新版本的react native 0.40
import React, { Component } from "react";
import {
View,
Text,
Button,
fetch,
NativeModules,
NativeEventEmitter
} from "react-native";
export default class VideoScreen extends Component {
componentDidMount(){
this.video();
}
video(){
fetch('http://localhost:4200/token').then(function(res) {
console.log(res.json());
})
}
}
Run Code Online (Sandbox Code Playgroud)