Skip to content

Instantly share code, notes, and snippets.

@thescientist13
Created May 4, 2018 21:39
Show Gist options
  • Save thescientist13/198d805bad82f60e29c5840800dc738b to your computer and use it in GitHub Desktop.
Save thescientist13/198d805bad82f60e29c5840800dc738b to your computer and use it in GitHub Desktop.
Example of the Providence Geeks website entry point
import React from 'react';
import ReactDOM from 'react-dom';
import { IndexRoute, Router, Route, browserHistory } from 'react-router';
import Bootstrap from './components/bootstrap/bootstrap';
import Home from './views/home/home';
import PostDetails from './views/post-details/post-details';
ReactDOM.render(
<Router history={browserHistory}>
<Route path='/' component={Bootstrap}>
<IndexRoute component={Home} />
<Route path='/home' component={Home} />
<Route path='/post/:id' component={PostDetails} />
</Route>
</Router>,
document.getElementById('root')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment