react-ajax请求后台数据方法react-ajax
react-ajaxaxios方法一:在package.json中配置 "proxy":"http://localhost:5000"这样localhost:5000就是我们要代理到的服务器 getStudentData = () => { axios.get('/students').then( (result) => { console.log(result.data); }, (reason)