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
@ -18,6 +18,12 @@ const mapStateToProps = state => ({
|
||||
|
||||
class HomeTimeline extends React.PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
hasUnread: PropTypes.bool,
|
||||
hasFollows: PropTypes.bool
|
||||
};
|
||||
|
||||
render () {
|
||||
const { intl, hasUnread, hasFollows } = this.props;
|
||||
|
||||
@ -45,10 +51,4 @@ class HomeTimeline extends React.PureComponent {
|
||||
|
||||
}
|
||||
|
||||
HomeTimeline.propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
hasUnread: PropTypes.bool,
|
||||
hasFollows: PropTypes.bool
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(HomeTimeline));
|
||||
|
Reference in New Issue
Block a user