var React = require('react'); module.exports = React.createClass({ propTypes: { onBackClick: React.PropTypes.func.isRequired, itemPath: React.PropTypes.oneOfType([ React.PropTypes.string, React.PropTypes.arrayOf(React.PropTypes.number) ]).isRequired, item: React.PropTypes.object.isRequired, }, render: function() { return (
{this.props.item.label}
); }, _onBackClick: function(evt) { evt.preventDefault(); this.props.onBackClick(this.props.itemPath, this.props.item); } });