我正在寻找每次尝试使React Router工作时出错的答案。
这是一个包含错误的GitHub链接:https://github.com/delmotte/error-react-router
只需运行npm install
和grunt
即可查看错误。
这是src/js/index.js
import React from 'react';
import { Router, Route } from 'react-router';
import TodoListContainer from './components/TodoListContainer.jsx';
import About from './components/About.jsx';
import App from './components/App.jsx';
React.render((
<Router>
<Route path="/" component={App}>
<Route path="about" component={About} />
<Route path="todolist" component={TodoListContainer} />
</Route>
</Router>
), document.getElementById('main'));
请帮帮我? 感谢