Quando eu coloco os route a minha página fica em branco. arquivo index:
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
import {Router,Route} from 'react-router';
import AutorBox from './Autor';
ReactDOM.render(
<Router>
<Route path="/" component={App}/>
<Route path="/autor" component={AutorBox}/>
<Route path="/lirvo"/>
</Router>,
//<App />,
document.getElementById('root')
);
app.js:
import React, { Component } from 'react';
import './css/pure-min.css';
import './css/side-menu.css';
class App extends Component {
constructor(){
super();
this.setState = {list: []}
}
render() {
return (
<div id="layout">
<a href="#menu" id="menuLink" className="menu-link">
<span></span>
</a>
<div id="menu">
<div className="pure-menu">
<a className="pure-menu-heading" href="#">Company</a>
<ul className="pure-menu-list">
<li className="pure-menu-item"><Link to="#" className="pure-menu-link">Home</Link></li>
<li className="pure-menu-item"><Link to="#" className="pure-menu-link">Autor</Link></li>
<li className="pure-menu-item"><Link to="#" className="pure-menu-link">Livro</Link></li>
</ul>
</div>
</div>
<div id="main">
<div className="header">
<h1>Bem-vindo ao sistema</h1>
</div>
<div className="content" id="content">
</div>
</div>
</div>
);
}
}
export default App;