问题描述
new GitHubTrending().fetchTrending(URL) 获取的data 数据为空数组
问题出现的环境背景及自己尝试过哪些方法
// 插件版本
"react": "16.8.3",
"react-native": "0.59.8",
"GitHubTrending": "^3.0.1",
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
import GitHubTrending from 'GitHubTrending'
const URL = 'https://github.com/trending/j...'
componentDidMount(){
new GitHubTrending().fetchTrending(URL)
.then((data)=> {
console.log(data); // 打印为[]
}).catch((error)=> {
//
});
}
你期待的结果是什么?实际看到的错误信息又是什么?
想像老师那样获取到数据 我在debugger-ui/里面显示 data 为空数组
github trending页面结构换了 老师的工具包更新了