Use ES Class Fields & Static Properties (#3008)
Use ES Class Fields & Static Properties (currently stage 2) for improve class outlook. Added babel-plugin-transform-class-properties as a Babel plugin.
This commit is contained in:
committed by
Eugen Rochko
parent
44a3584e2d
commit
2991a7cfe6
@ -5,13 +5,12 @@ import { FormattedMessage } from 'react-intl';
|
||||
|
||||
class UploadArea extends React.PureComponent {
|
||||
|
||||
constructor (props, context) {
|
||||
super(props, context);
|
||||
static propTypes = {
|
||||
active: PropTypes.bool,
|
||||
onClose: PropTypes.func
|
||||
};
|
||||
|
||||
this.handleKeyUp = this.handleKeyUp.bind(this);
|
||||
}
|
||||
|
||||
handleKeyUp (e) {
|
||||
handleKeyUp = (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
@ -52,9 +51,4 @@ class UploadArea extends React.PureComponent {
|
||||
|
||||
}
|
||||
|
||||
UploadArea.propTypes = {
|
||||
active: PropTypes.bool,
|
||||
onClose: PropTypes.func
|
||||
};
|
||||
|
||||
export default UploadArea;
|
||||
|
Reference in New Issue
Block a user