Skip to content

Instantly share code, notes, and snippets.

@ammark47
Created December 24, 2015 23:23
Show Gist options
  • Save ammark47/2e632edad98b7893b437 to your computer and use it in GitHub Desktop.
Save ammark47/2e632edad98b7893b437 to your computer and use it in GitHub Desktop.
var React = require('react');
var Router = require('react-router');
var DefaultRoute = Router.DefaultRoute;
var Link = Router.Link;
var Route = Router.Route;
var RouteHandler = Router.RouteHandler;
var App = require('./app');
var HomeView = require('./HomeView');
var ga = require('react-google-analytics');
var GAInitiailizer = ga.Initializer;
var render = require('react-dom');
// var routes = (
// <Route>
// <Route path="/" handler={HomeView} />
// <Route path="/app" handler={App} />
// </Route>
// );
render((
<Router>
<Route path="/" handler={HomeView} />
<Route path="/app" handler={App} />
</Router>
), document.body)
// Router.run(routes, function(Handler) {
// React.render(<Handler />, document.body);
// });
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