I started to see this template pop up:
class MyComponent extends React.Component {
static propTypes = {
};
}
I thought that at first it was not valid until I looked and realized that it was ES7. Is this safe (i.e. future) syntax to use? I ask because I understand that not all syntaxes in ES6 and ES7 are approved, many are simply offered. I like this better than what I used:
class MyComponent extends React.Component {
}
MyComponent.propTypes = { .. }
source
share