/** @jsx React.DOM */ var App = React.createClass({ getInitialState: function () { return { settings: {} //TODO: How explicit should we get here? //List all subattributes? }; }, componentDidMount: function () { //TODO: Replace DummyStore with real settings over WS (https://facebook.github.io/react/tips/initial-ajax.html) //TODO: Is there a sensible place where we can store this? var settings = new DummySettings({ version: "0.12" }); settings.addChangeListener(this._onSettingsChange); //This would be async in some way or another. this._onSettingsChange(null, settings); }, _onSettingsChange: function(event, settings){ this.setState({settings: settings.getAll()}); }, render: function () { return (
); } }); var Traffic = React.createClass({ render: function(){ var json = JSON.stringify(this.props, null, 4); var i = 5; while(i--) json += json; return (
{json}
); } }); var Reports = React.createClass({ render: function(){ return (
Report Editor
); } }); var routes = ( );