title: How to set displayName in class based component?
body: <p>I'm trying to set the <code>displayName</code> property of this class that extends <code>React.Component</code>. The <a href="https://facebook.github.io/react/docs/react-component.html#displayname" rel="noreferrer">React docs</a> say that <code>displayName</code> is a property, so it possible to set it in the constructor? Here's what I'm trying: </p>
  
  <pre><code>class TestUI extends React.Component {
     constructor(){
       this.displayName = 'CustomTestUI'
     }
  }
  </code></pre>
  
  <p>But the library I'm using (<a href="https://github.com/unicorn-standard/react-pacomo" rel="noreferrer">pacomo</a>) isn't picking it up. Am I setting it incorrectly? I've also tried setting it outside the class like stateless components MyClass.displayName = 'Test' which also doesn't have an effect. </p>
  
  <p>Edit: The answer is: <code>static displayName = 'CustomTestUI'</code></p>