title: React Component check is variable is empty
body: <p>I have a react component where I also have a variable in the class/component/</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import React from 'react';
  
  export class Header extends React.Component {
    constructor() {
      super();
      this.myvar = 'some text';
    }
  
    render() {
      return (
        &lt;div&gt;
          &lt;div&gt;{this.myvar}&lt;/div&gt;
        &lt;/div&gt;
  
      );
    }
  }
  </code></pre>
  
  <p>How would I check if "myvar" is empty and if it is so something with the component above?</p>