Example #1
0
$(function() {
  RRouter.start(routes, function(view) {
    React.renderComponent(
      <Huxley view={view} />,
      document.getElementById('huxley-app')
    );
  });
});
Example #2
0
var React     = window.React = require('react'); // window.React loads chrome react devtools
var RRouter   = require('rrouter');
var FastClick = require('fastclick');

var Routes = require('./routes');

var appEl = document.querySelector("#app");

FastClick(appEl);

React.initializeTouchEvents(true);

RRouter.start(Routes, view =>
  React.renderComponent(view, appEl));