Is it OK to put propTypes and defaultProps as static props inside React class?
<p>This is the way I've been doing it for quite some time now:</p>

<pre><code>export default class AttachmentCreator extends Component {
  render() {
    return &lt;div&gt;
      &lt;RaisedButton primary label="Add Attachment" /&gt;
    &lt;/div&gt;
  }
}

AttachmentCreator.propTypes = {
  id: PropTypes.string,
};
</code></pre>

<p>But I've seen people doing it this way:</p>

<pre><code>export default class AttachmentCreator extends Component {
  static propTypes = {
    id: PropTypes.string,
  };

  render() {
    return &lt;div&gt;
      &lt;RaisedButton primary label="Add Attachment" /&gt;
    &lt;/div&gt;
  }
}
</code></pre>

<p>And in fact I've seen people setting initial state outside the constructor as well. Is this good practice? It's been bugging me, but I remember a discussion somewhere where someone said that setting default props as a static is not a good idea - I just don't remember why.</p>