/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import React from 'react'; import { Router, Route, Link, IndexRoute, hashHistory } from 'react-router'; const Container = (props) => const Links = () => <nav> </nav> class App extends React.Component { render(){ return ( <Router history={ hashHistory }> <Route path="/" component={Container}> <IndexRoute components={ { header: Home, body: HomeBody } }></IndexRoute> <Route path="/other" components={ { header: Other, body: OtherBody} }></Route> </Route> </Router> ); } } export default App;