var React = require('react'); var TextInput = React.createClass({ propTypes: { name: React.PropTypes.string.isRequired, label: React.PropTypes.string.isRequired, id: React.PropTypes.string.isRequired, placeholder: React.PropTypes.string, value: React.PropTypes.string, required: React.PropTypes.bool }, getDefaultProps: function() { return { required: false }; }, getInitialState: function() { return {}; }, getValue: function() { return this.refs.input.getDOMNode().value.trim(); }, render: function() { return (