Skip to content

Instantly share code, notes, and snippets.

@manavsehgal
Created May 24, 2016 13:33
Show Gist options
  • Save manavsehgal/cc5cc2263a7e06a20a3562989adf4869 to your computer and use it in GitHub Desktop.
Save manavsehgal/cc5cc2263a7e06a20a3562989adf4869 to your computer and use it in GitHub Desktop.
React app entry for basic use case of React Router
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