Skip to content

Instantly share code, notes, and snippets.

@ammark47
Created December 25, 2015 15:02
Show Gist options
  • Save ammark47/1247be91e12a201b9865 to your computer and use it in GitHub Desktop.
Save ammark47/1247be91e12a201b9865 to your computer and use it in GitHub Desktop.
import React from 'react';
import { Router, Route, Link } from 'react-router';
// import App from './app';
// import HomePage from './HomeView';
var App = require('./app');
var HomeView = require('./HomeView');
import ga from 'react-google-analytics';
import { GAInitiailizer } from 'react-google-analytics';
import { render } from 'react-dom';
var base = document.getElementById('base');
// var routes = (
// <Route>
// <Route path="/" Handler={HomeView} />
// //<Route path="/app" location={App} />
// </Route>
// );
// render(<Router routes={routes} />, base);
// render(<HomeView />, base);
// Router.run(routes, function(Handler) {
// React.render(<Handler />, document.body);
// });
// console.log(HomeView);
render((
<Router>
// <Route path="/" component={HomeView}>
<Route path="/app" component={App} />
// </Route>
</Router>
), document.getElementById('base'));
ga('create', 'UA-XXXX-Y', 'auto');
ga('send', 'pageview');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment