Q:

If true: render , else: don't render that 

How do I render pricePerMeterTr only when pricePerMeter is available? 
I tried with let pricePerMeterTr = ”” but that rendered a span and threw an error. 
When is set it to let pricePerMeterTr = <tr><td></td></tr>; I get no errors but it renders the <tr>, which I don't want it to do.
render() {

    const { someValue, pricePerMeter } = this.state.inputValues;

    let pricePerMeterTr = <tr><td></td></tr>;

    if(pricePerMeter) {
        pricePerMeterTr = (<tr>
            <td className="text-medium">Pris per m<sup>2</sup></td>
            <td className="text-right">{pricePerMeter} kr</td>
        </tr>)
    }

    return (
        <div className="wrapper-medium hidden-sm-down">
         *H2*
          <table className="table">
            <tbody>
              <tr>
                <td className="text-medium”>Some label</td>
                <td className="text-right”>{someValue}</td>
              </tr>
              {pricePerMeterTr}
            </tbody>
             *table footer*
          </table>
        </div>

    );
}

};

A:

Try null. 
let pricePerMeterTr = null

