0
0
Fork 0

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:
Yamagishi Kazutoshi 2017-05-12 21:44:10 +09:00 committed by Eugen Rochko
parent 44a3584e2d
commit 2991a7cfe6
79 changed files with 838 additions and 1128 deletions

View file

@ -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));