react conditioanl attributes code example
Example: How do I conditionally add attributes to React components?
var InputComponent = React.createClass({
render: function() {
var required = true;
var disabled = false;
return (
<input type="text" disabled={disabled} required={required} />
);
}
});