Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* @jsx React.DOM
*/
var React = require('react');
var ReactAsync = require('react-async');
var ReactMount = require('react/lib/ReactMount');
var ReactBatching = require('react-raf-batching').inject();
var Router = require('./mixins/Router');
var Navigator = require('./mixins/Navigator');
var PageController = require('./mixins/PageController');
var HTMLLayout = require('./views/layouts/HTML');
var App = ReactAsync.createClass({
mixins: [Navigator],
getInitialStateAsync: function(cb) {
var page = Router.getRoute(this.props.path).page;
PageController.setState(page, this.props, cb);
},
onNavigate: function(path) {
this.props.path = path;
this.componentDidMount(); // to react-async
},
render: function() {
return (