diff --git a/app/soapbox/components/relative_timestamp.js b/app/soapbox/components/relative_timestamp.js index e66c031c1..b089c6dfc 100644 --- a/app/soapbox/components/relative_timestamp.js +++ b/app/soapbox/components/relative_timestamp.js @@ -137,7 +137,7 @@ class RelativeTimestamp extends React.Component { this.state.now !== nextState.now; } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (this.props.timestamp !== nextProps.timestamp) { this.setState({ now: Date.now() }); } diff --git a/app/soapbox/features/account_gallery/index.js b/app/soapbox/features/account_gallery/index.js index de2213b07..0b55a0cb0 100644 --- a/app/soapbox/features/account_gallery/index.js +++ b/app/soapbox/features/account_gallery/index.js @@ -97,7 +97,7 @@ class AccountGallery extends ImmutablePureComponent { } } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (nextProps.accountId && nextProps.accountId !== -1 && (nextProps.accountId !== this.props.accountId && nextProps.accountId)) { this.props.dispatch(fetchAccount(nextProps.params.accountId)); this.props.dispatch(expandAccountMediaTimeline(nextProps.accountId)); diff --git a/app/soapbox/features/account_timeline/index.js b/app/soapbox/features/account_timeline/index.js index 4bd7090c0..131da0579 100644 --- a/app/soapbox/features/account_timeline/index.js +++ b/app/soapbox/features/account_timeline/index.js @@ -81,7 +81,7 @@ class AccountTimeline extends ImmutablePureComponent { } } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { const { me } = nextProps; if (nextProps.accountId && nextProps.accountId !== -1 && (nextProps.accountId !== this.props.accountId && nextProps.accountId) || nextProps.withReplies !== this.props.withReplies) { this.props.dispatch(fetchAccount(nextProps.accountId)); diff --git a/app/soapbox/features/compose/components/emoji_picker_dropdown.js b/app/soapbox/features/compose/components/emoji_picker_dropdown.js index f88df3a49..dc3ec4c7f 100644 --- a/app/soapbox/features/compose/components/emoji_picker_dropdown.js +++ b/app/soapbox/features/compose/components/emoji_picker_dropdown.js @@ -56,7 +56,7 @@ class ModifierPickerMenu extends React.PureComponent { this.props.onSelect(e.currentTarget.getAttribute('data-index') * 1); } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (nextProps.active) { this.attachListeners(); } else { diff --git a/app/soapbox/features/favourites/index.js b/app/soapbox/features/favourites/index.js index 84cb94c1a..0097315bb 100644 --- a/app/soapbox/features/favourites/index.js +++ b/app/soapbox/features/favourites/index.js @@ -27,7 +27,7 @@ class Favourites extends ImmutablePureComponent { this.props.dispatch(fetchFavourites(this.props.params.statusId)); } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) { this.props.dispatch(fetchFavourites(nextProps.params.statusId)); } diff --git a/app/soapbox/features/followers/index.js b/app/soapbox/features/followers/index.js index 86709545e..48eeabb0b 100644 --- a/app/soapbox/features/followers/index.js +++ b/app/soapbox/features/followers/index.js @@ -69,7 +69,7 @@ class Followers extends ImmutablePureComponent { } } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (nextProps.accountId && nextProps.accountId !== -1 && (nextProps.accountId !== this.props.accountId && nextProps.accountId)) { this.props.dispatch(fetchAccount(nextProps.accountId)); this.props.dispatch(fetchFollowers(nextProps.accountId)); diff --git a/app/soapbox/features/following/index.js b/app/soapbox/features/following/index.js index db42b53b3..8cfdbecf6 100644 --- a/app/soapbox/features/following/index.js +++ b/app/soapbox/features/following/index.js @@ -69,7 +69,7 @@ class Following extends ImmutablePureComponent { } } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (nextProps.accountId && nextProps.accountId !== -1 && (nextProps.accountId !== this.props.accountId && nextProps.accountId)) { this.props.dispatch(fetchAccount(nextProps.accountId)); this.props.dispatch(fetchFollowing(nextProps.accountId)); diff --git a/app/soapbox/features/groups/edit/index.js b/app/soapbox/features/groups/edit/index.js index f63447b2f..e431faa42 100644 --- a/app/soapbox/features/groups/edit/index.js +++ b/app/soapbox/features/groups/edit/index.js @@ -61,7 +61,7 @@ class Edit extends React.PureComponent { } } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (!this.props.group && nextProps.group) { this.props.setUp(nextProps.group); } diff --git a/app/soapbox/features/groups/members/index.js b/app/soapbox/features/groups/members/index.js index adf1984ca..3e7f6128d 100644 --- a/app/soapbox/features/groups/members/index.js +++ b/app/soapbox/features/groups/members/index.js @@ -36,7 +36,7 @@ class GroupMembers extends ImmutablePureComponent { this.props.dispatch(fetchMembers(id)); } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (nextProps.params.id !== this.props.params.id) { this.props.dispatch(fetchMembers(nextProps.params.id)); } diff --git a/app/soapbox/features/groups/removed_accounts/index.js b/app/soapbox/features/groups/removed_accounts/index.js index c3431fe2f..a375ca90c 100644 --- a/app/soapbox/features/groups/removed_accounts/index.js +++ b/app/soapbox/features/groups/removed_accounts/index.js @@ -43,7 +43,7 @@ class GroupRemovedAccounts extends ImmutablePureComponent { this.props.dispatch(fetchRemovedAccounts(id)); } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (nextProps.params.id !== this.props.params.id) { this.props.dispatch(fetchRemovedAccounts(nextProps.params.id)); } diff --git a/app/soapbox/features/hashtag_timeline/index.js b/app/soapbox/features/hashtag_timeline/index.js index c73c7ce35..c841aeea4 100644 --- a/app/soapbox/features/hashtag_timeline/index.js +++ b/app/soapbox/features/hashtag_timeline/index.js @@ -81,7 +81,7 @@ class HashtagTimeline extends React.PureComponent { dispatch(expandHashtagTimeline(id, { tags })); } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { const { dispatch, params } = this.props; const { id, tags } = nextProps.params; diff --git a/app/soapbox/features/list_timeline/index.js b/app/soapbox/features/list_timeline/index.js index 349052ab3..a606d90dc 100644 --- a/app/soapbox/features/list_timeline/index.js +++ b/app/soapbox/features/list_timeline/index.js @@ -50,7 +50,7 @@ class ListTimeline extends React.PureComponent { this.handleDisconnect(); } - componentWillReceiveProps(nextProps) { + componentDidUpdate(nextProps) { if (nextProps.params.id !== this.props.params.id) { this.handleDisconnect(); this.handleConnect(nextProps.params.id);