var Inventory = React.createClass({ // propTypes: { // cards: React.PropTypes.array // }, getInitialState: function() { return { cards: this.props.cards }; }, // componentDidMount: function() { // $.get(this.props.source, function(result) { // console.log("Hi from inventory didmount"); // if (this.isMounted()) { // this.setState({ // cards: result // }); // } // }.bind(this)); // }, render: function() { if (this.props.cards) { return (
Inventory:
); } else { return (
); } } }); // TODO: Remove this? //$(document).on("page:change", function() { // if (document.getElementById("inventory") != null) { // React.render( // , document.getElementById('inventory') // ); // } //})