我只安装android studio 3.1.3
我无法同步“连接超时:连接”的gradle原因
关于如何删除它的任何想法?
顶级构建文件,您可以在其中添加所有子项目/模块共有的配置选项。
buildscript {
task clean(type: Delete) {
delete rootProject.buildDir
}
import React from 'react';
export const MenuContext = React.createContext();
class MenuProvider extends React.Component {
state = {
menu: {}
};
actions = {
fetchMenu: async() => {
const response = await fetch('/admin/json/menu.json');
const body = await response.json();
this.setState({
menu: body
});
}
}
componentDidMount() {
this.actions.fetchMenu();
}
render() {
return(
<MenuContext.Provider value={{state: this.state, actions: this.actions}}>
{this.props.children}
</MenuContext.Provider>
)
}
}
export default MenuProvider;
}