我正在编写反应路由,在此代码中显示“<”的意外错误在第8行。我的代码是
var React = require('react');
var Route = ReactRouter.Route;
var Link = ReactRouter.Link;
var App=React.createClass({
render: function(){
return(
<div className="header">
<h1>Welcome to Twitter</h1>
<nav className="links">
<link to ="https://about.twitter.com/"> About </link>
<link to="/login"> Login </link>
<link to="/sign_up"> Sign Up </link>
</nav>
{this.props.children}
</div>
)
}
})
React.render((
<Router>
<Route path="/" component={App} />
<Route path="login" components={Login} />
<Route path="sign_up" components={Sign_Up} />
</Router>
),document.body)
请帮助我,因为我已经浪费了很多时间。