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
|
@ -22,16 +22,19 @@ const mapStateToProps = state => ({
|
|||
|
||||
class Favourites extends ImmutablePureComponent {
|
||||
|
||||
constructor (props, context) {
|
||||
super(props, context);
|
||||
this.handleScrollToBottom = this.handleScrollToBottom.bind(this);
|
||||
}
|
||||
static propTypes = {
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
statusIds: ImmutablePropTypes.list.isRequired,
|
||||
loaded: PropTypes.bool,
|
||||
intl: PropTypes.object.isRequired,
|
||||
me: PropTypes.number.isRequired
|
||||
};
|
||||
|
||||
componentWillMount () {
|
||||
this.props.dispatch(fetchFavouritedStatuses());
|
||||
}
|
||||
|
||||
handleScrollToBottom () {
|
||||
handleScrollToBottom = () => {
|
||||
this.props.dispatch(expandFavouritedStatuses());
|
||||
}
|
||||
|
||||
|
@ -56,12 +59,4 @@ class Favourites extends ImmutablePureComponent {
|
|||
|
||||
}
|
||||
|
||||
Favourites.propTypes = {
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
statusIds: ImmutablePropTypes.list.isRequired,
|
||||
loaded: PropTypes.bool,
|
||||
intl: PropTypes.object.isRequired,
|
||||
me: PropTypes.number.isRequired
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(injectIntl(Favourites));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue