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:
parent
44a3584e2d
commit
2991a7cfe6
79 changed files with 838 additions and 1128 deletions
|
@ -3,9 +3,9 @@ import PropTypes from 'prop-types';
|
|||
|
||||
class Warning extends React.PureComponent {
|
||||
|
||||
constructor (props) {
|
||||
super(props);
|
||||
}
|
||||
static propTypes = {
|
||||
message: PropTypes.node.isRequired
|
||||
};
|
||||
|
||||
render () {
|
||||
const { message } = this.props;
|
||||
|
@ -19,8 +19,4 @@ class Warning extends React.PureComponent {
|
|||
|
||||
}
|
||||
|
||||
Warning.propTypes = {
|
||||
message: PropTypes.node.isRequired
|
||||
};
|
||||
|
||||
export default Warning;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue