JSDoc for a ES6 react component

Viewed 16739

I think the JSDoc comment for a react component could look like this:

/**
 * My component...
 *
 * @namespace MyComponent
 * @memberof app.components
 */
app.components.MyComponent = React.createClass({
    })

But how should it look like if I'm using ES6?

/**
 * My component...
 *
 * @namespace MyComponent
 * @memberof ??
 */
    class MyComponent extends Component {
      /**
       * PropTypes
       * @param {string} element
       */
      static propTypes = {
          element: PropTypes.object
      }

      /**
       * Constructor
       * How to take care about onChange and states?
       */
      constructor () {
        super()
        this.onChange = this.onChange.bind(this)
        this.state = {
          anything: true
        }
      }
    }

Also I do not understand how to document the static propTypes and the constructor...

Are there more tags missing for the 'best' documentation possible?

2 Answers
Related