为了账号安全,请及时绑定邮箱和手机立即绑定

react-route ^4.1.2报错?

./src/components/root.js
 Line 59:  'hashHistory' is not defined  no-undef
 Line 61:  'IndexRoute' is not defined   react/jsx-no-undef

import { Router, IndexRoute, Link, Route, browserHistory, hashHistory} from 'react-router';


let Root =React.createClass({
   render(){
       return(
           <Router history={hashHistory}>
               <Route path="/" component={App}>
                   <IndexRoute component={Player}/>
                   <Route path="/list" component={MusicList} />
               </Route>
           </Router>
       )
   }
});


正在回答

0 回答

举报

0/150
提交
取消
使用React构建一款音乐播放器
  • 参与学习       26488    人
  • 解答问题       156    个

从零开始使用React构建一款音乐播放器

进入课程

react-route ^4.1.2报错?

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号