Created
May 24, 2016 13:33
-
-
Save manavsehgal/cc5cc2263a7e06a20a3562989adf4869 to your computer and use it in GitHub Desktop.
React app entry for basic use case of React Router
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import BlogPage from './components/BlogPage.jsx'; | |
import HomePage from './components/HomePage.jsx'; | |
import { Router, Route, hashHistory } from 'react-router'; | |
ReactDOM.render( | |
<Router history={hashHistory}> | |
<Route path="/" component={HomePage}/> | |
<Route path="/blog" component={BlogPage}/> | |
</Router>, | |
document.getElementById('app') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment