Javascript 物料ui V3未加载获取后数据(或页面加载)的第一个选项卡
我用的是材料UI版本3,抓取数据后加载选项卡和选项卡容器,但第一个选项卡并没有自动加载到页面加载上,需要点击它查看信息 我在谷歌上搜索过,试图设置这个Javascript 物料ui V3未加载获取后数据(或页面加载)的第一个选项卡,javascript,reactjs,material-ui,Javascript,Reactjs,Material Ui,我用的是材料UI版本3,抓取数据后加载选项卡和选项卡容器,但第一个选项卡并没有自动加载到页面加载上,需要点击它查看信息 我在谷歌上搜索过,试图设置这个initialSelectedIndex仍然不起作用,我从那里看到了Github,但没有进一步的信息。 这是 非常感谢 解决componentDidMount中的请求后,您可以获取repo: componentDidMount() { const results = fetch("https://api.github.com/users
initialSelectedIndex
仍然不起作用,我从那里看到了Github,但没有进一步的信息。
这是
非常感谢 解决componentDidMount中的请求后,您可以获取repo:
componentDidMount() {
const results = fetch("https://api.github.com/users")
.then(res => {
return res.json();
})
.then(data => {
//fetch the repos
this.handleReferences(data[this.state.value].repos_url);
this.setState({ results: data });
});
}
当componentDidMount中的请求得到解决时,您可以获取repo:
componentDidMount() {
const results = fetch("https://api.github.com/users")
.then(res => {
return res.json();
})
.then(data => {
//fetch the repos
this.handleReferences(data[this.state.value].repos_url);
this.setState({ results: data });
});
}
很好!!谢谢你的帮助!很好!!谢谢你的帮助!