title: Rendering "a" with optional href in React.js
body: <p>I need to render a table with a link in one of the columns, and searching for a most elegant way to do it. My main problem is - not all table rows are supplied with that link. If link is present - I need that "a" tag rendered. If not - no need for "a" tag at all. Generally speaking I would like react to handle that choice (render vs not render) depending on this.state. </p>
  
  <p>This is what I have at the moment.</p>
  
  <pre><code>React.createClass({
      getInitialState: function () {
          return {
              pipeline: this.props.data.pipeline,
              liveUrl: this.props.data.liveUrl,
              posted: this.props.data.created,
              expires: this.props.data.end
          };
      },
  
      render: function () {
          return (
              &lt;tr className="posting-list"&gt;
                  &lt;td&gt;&lt;a href={this.state.liveUrl} target="_blank"&gt;{this.state.pipeline}&lt;/a&gt;&lt;/td&gt;
                  &lt;td&gt;Posted&lt;/td&gt;
                  &lt;td&gt;
                      &lt;input className="datepicker" type="text" value={this.state.posted}/&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input className="datepicker" type="text" value={this.state.expires}/&gt;
                  &lt;/td&gt;
                  &lt;td&gt;UPDATE, DELETE&lt;/td&gt;
              &lt;/tr&gt;
          );
      }
  });
  </code></pre>
  
  <p>This results is DOM element :</p>
  
  <p><code>&lt;a href="" target="_blank" data-reactid=".0.6.0.0.1:1.0.0"&gt;XING_batch&lt;/a&gt;</code></p>
  
  <p>This is not acceptable solution for me, because those blank hrefs are still clickable.
  I also tried adding some logic to getInitalState(
  <code>liveUrl: (this.props.data.liveUrl !== "") ? this.props.data.liveUrl : "javascript:void;",</code>
  ), which worked fine, but looks weird, and adds errors in console(<code>Uncaught SyntaxError: Unexpected token ;</code>)</p>
  
  <p>The only way I've got left is creating  2 different components for