Created
December 24, 2015 23:24
-
-
Save ammark47/242e9cfd94c806d12975 to your computer and use it in GitHub Desktop.
This file contains 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
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; | |
import { render } from '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