I think the JSDoc comment for the responsive component might look like this:
app.components.MyComponent = React.createClass({
})
But what should it look like if I use ES6?
class MyComponent extends Component {
static propTypes = {
element: PropTypes.object
}
constructor () {
super()
this.onChange = this.onChange.bind(this)
this.state = {
anything: true
}
}
}
Also I don't understand how to document static propTypes and constructor ...
Are there more tags for "better" documentation?
source
share