Fixed deprecated lifecycles

This commit is contained in:
Mustafa Buyukcelebi 2019-09-27 16:21:46 +03:00
parent 8881359ea5
commit 8349fb5274
29 changed files with 182 additions and 182 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -43,7 +43,7 @@
"lodash": "^4.17.13",
"moment": "^2.22.2",
"react": "16.8.6",
"react-intl": "^3.1.6",
"react-intl": "^3.3.1",
"react-native": "0.60.5",
"react-native-actionsheet": "^2.4.2",
"react-native-autocomplete-input": "^4.1.0",

View File

@ -25,7 +25,7 @@ class BottomTabBarView extends PureComponent {
}
// Component Life Cycles
componentWillUpdate(nextProps) {
UNSAFE_componentWillUpdate(nextProps) {
const {
navigation: {
state: { index, routes },

View File

@ -32,7 +32,7 @@ class CollapsibleCardView extends PureComponent {
};
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { isExpanded, moreHeight, locked } = this.props;
const { expanded } = this.state;

View File

@ -36,7 +36,7 @@ class CommentsContainer extends Component {
this._getComments();
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { commentCount, selectedFilter } = this.props;
if (nextProps.commentCount > commentCount) {

View File

@ -25,7 +25,7 @@ export default class TagAreaView extends Component {
}
// Component Life Cycles
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { draftChips, isRemoveTag } = this.props;
if (nextProps.draftChips && nextProps.draftChips !== draftChips) {

View File

@ -24,7 +24,7 @@ export default class TitleAreaView extends Component {
}
// Component Life Cycles
componentWillReceiveProps = nextProps => {
UNSAFE_componentWillReceiveProps = nextProps => {
const { text } = this.state;
if (nextProps.value !== text) {
this.setState({ text: nextProps.value });

View File

@ -33,7 +33,7 @@ class FormInputView extends Component {
}
// Component Life Cycles
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { isValid } = this.props;
if (nextProps.isValid !== isValid) {

View File

@ -28,7 +28,7 @@ class MainButton extends Component {
}
// Component Life Cycles
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { isLoading, isDisable } = this.props;
if (nextProps.isLoading !== isLoading || nextProps.isDisable !== isDisable) {
this.setState({

View File

@ -32,7 +32,7 @@ export default class MarkdownEditorView extends Component {
}
// Lifecycle functions
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { draftBody, uploadedImage, isPreviewActive } = this.props;
if (!nextProps.isPreviewActive && isPreviewActive) {
this.setState({

View File

@ -23,7 +23,7 @@ class NotificationLineView extends PureComponent {
}
// Component Life Cycles
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { notification } = this.props;
if (notification.read !== nextProps.notification.read) {

View File

@ -22,7 +22,7 @@ class PinAnimatedInput extends PureComponent {
this.dots[3] = new Animated.Value(0);
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { loading } = this.props;
if (loading !== nextProps.loading) {
if (nextProps.loading) {

View File

@ -24,7 +24,7 @@ class PostCardContainer extends PureComponent {
};
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (get(nextProps, 'isRefresh')) {
this._fetchPost();
}

View File

@ -37,7 +37,7 @@ class PostCardView extends Component {
}
// Component Lifecycle Functions
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { content } = this.props;
const rebloggedBy = get(content, 'reblogged_by[0]', null);
const _rebloggedBy = get(nextProps.content, 'reblogged_by[0]', null);

View File

@ -30,7 +30,7 @@ class PostDisplayContainer extends Component {
}
// Component Life Cycle Functions
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { isFetchPost } = this.props;
if (isFetchPost !== nextProps.isFetchPost && nextProps.isFetchPost) {
this._fetchPost();

View File

@ -61,7 +61,7 @@ class PostsView extends Component {
}
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { currentAccountUsername, changeForceLoadPostState } = this.props;
if (

View File

@ -30,7 +30,7 @@ class SideMenuContainer extends Component {
// Component Life Cycle Functions
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { isLoggedIn } = this.props;
if (isLoggedIn) {

View File

@ -36,7 +36,7 @@ class SideMenuView extends Component {
// Component Life Cycles
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { isLoggedIn, accounts } = this.props;
const { isAddAccountIconActive } = this.state;

View File

@ -47,7 +47,7 @@ class UpvoteView extends Component {
this._calculateEstimatedAmount();
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { isVoted, upvotePercent } = this.props;
const { isVoted: localIsVoted } = this.state;

View File

@ -38,7 +38,7 @@ class WalletContainer extends Component {
this._getWalletData(selectedUser);
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { selectedUser } = this.props;
if (selectedUser.name !== nextProps.selectedUser.name) {

View File

@ -53,7 +53,7 @@ class PointsContainer extends Component {
}
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { username } = this.props;
const _username = get(nextProps, 'username');

View File

@ -74,7 +74,7 @@ class ProfileContainer extends Component {
this._loadProfile(targetUsername);
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
if (!nextProps.isConnected) return;
const { isLoggedIn, navigation } = this.props;

View File

@ -113,7 +113,7 @@ class ApplicationContainer extends Component {
this._createPushListener();
};
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const {
isDarkTheme: _isDarkTheme,
selectedLanguage,

View File

@ -28,7 +28,7 @@ class ApplicationScreen extends Component {
EStyleSheet.build(isDarkTheme ? darkTheme : lightTheme);
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { toastNotification } = this.props;
if (nextProps.toastNotification && nextProps.toastNotification !== toastNotification) {
this.setState({ isShowToastNotification: true });

View File

@ -42,7 +42,7 @@ class EditorScreen extends Component {
}
// Component Life Cycles
componentWillReceiveProps = async nextProps => {
UNSAFE_componentWillReceiveProps = async nextProps => {
const { draftPost, isUploading } = this.props;
if (nextProps.draftPost && draftPost !== nextProps.draftPost) {

View File

@ -34,7 +34,7 @@ class NotificationContainer extends Component {
}
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { selectedFilter } = this.state;
const { username } = this.props;

View File

@ -47,7 +47,7 @@ class PostContainer extends Component {
if (isHasParentPost) this.setState({ isHasParentPost });
}
componentWillReceiveProps(nextProps) {
UNSAFE_componentWillReceiveProps(nextProps) {
const { navigation } = this.props;
const { isFetch: nextIsFetch } = get(nextProps, 'navigation.state.params');

View File

@ -1116,24 +1116,24 @@
url "^0.11.0"
xmldom "^0.1.27"
"@formatjs/intl-relativetimeformat@^3.0.2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-3.0.2.tgz#09943f6e008aba611f973edab284e1051d977951"
integrity sha512-smy2oNh+gi/Gr7kPYL5EaRUW3lBjn3yaPfHyDAljzabN3ZVhZsVl8oZV78HlQYoXz1h1GFpj/GbO5xkjSzffPw==
"@formatjs/intl-relativetimeformat@^4.0.1":
version "4.1.1"
resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-4.1.1.tgz#6b51ddca6446ae686e96c313cb55100877ec2dcb"
integrity sha512-k+WADErd1ORTcJ/4LyrVzJcXkcXL3l9wKCsMT2d7Kq4dbap2OKv2GLBGdKR3H7SBKCooyDRV5W79et9egGzsyQ==
dependencies:
"@formatjs/intl-utils" "^1.0.1"
"@formatjs/intl-utils" "^1.3.0"
"@formatjs/intl-unified-numberformat@^0.4.9":
version "0.4.9"
resolved "https://registry.yarnpkg.com/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-0.4.9.tgz#343ce36d8c95bd5529ce80120a4abbf933cae69e"
integrity sha512-llHvEZTaMEStXK7mFjUMcsS3Qtxd3csdgyo2j/fvjk+NdEBjGYrEO7gdLhGAjh6sDeRGFzMze91ScrwLK3ukqw==
"@formatjs/intl-unified-numberformat@^0.5.2":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-0.5.2.tgz#c530d312f14d6c08ca4eb38bdcd25d73520cc29f"
integrity sha512-b/Oh/e1wIrGhS8mZaEphqzzXvadir9zegqNsRo3QKQwYuiBRHLupk0st1NTyUwVTy9lI58HpL0U/RJxqki8diQ==
dependencies:
"@formatjs/intl-utils" "^1.0.1"
"@formatjs/intl-utils" "^1.1.1"
"@formatjs/intl-utils@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@formatjs/intl-utils/-/intl-utils-1.0.1.tgz#cc24ffbf36c05793ab9cd1eceee12ca95b1d7e08"
integrity sha512-Q9mHePkcnNkazb+89mZtYj01YMKxDO/VtsZI56MDzb2Cfed0dPugXZHpXgSXYPmd/4C6gp0M759xGEGFX3JS+w==
"@formatjs/intl-utils@^1.1.1", "@formatjs/intl-utils@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@formatjs/intl-utils/-/intl-utils-1.3.0.tgz#4db3793f5aa25ef7d207bbd8a19a390a1ee36e07"
integrity sha512-86/alWvUC+6doouKTt8n7fQr2b9XzLigdUgYdTLRa+0RC5cI1cMjQJV/I1qzlKAk/9dCuYBxOJsytXCUzmrAVA==
"@hapi/address@2.x.x":
version "2.1.1"
@ -4869,28 +4869,28 @@ inquirer@^6.2.2:
strip-ansi "^5.1.0"
through "^2.3.6"
intl-format-cache@^4.1.19:
version "4.1.19"
resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-4.1.19.tgz#43da8f621693dbd770683caacdae049ff3e6f31a"
integrity sha512-LIkxfB1KriplBCKsrmWNdmk/fYNFDFkPtmEmPr0zoErypdEsxN9Fpq8VOkIg/JvJk0VMFaDCyjaJ+JRCDqbi2g==
intl-format-cache@^4.1.22, intl-format-cache@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-4.2.1.tgz#cd7b2d18a2e524f5fef51d3c94996e469e07f0b3"
integrity sha512-H4XtqFAaLkw7S9qLLLt/CdSLPVrcWqbr9oqmTvyzo7OelnOR8UDsIoK9TQ2f8powT2Fsm7lJ8aUFx+uNCVfuTA==
intl-locales-supported@^1.4.5:
version "1.4.7"
resolved "https://registry.yarnpkg.com/intl-locales-supported/-/intl-locales-supported-1.4.7.tgz#24acc88e1337429dbf1926463e6234c1325bbe6d"
integrity sha512-3arwVxqTBWRom7NiK9GUB25qLtJToH3QYxqMjbbq/+R3Pz3mMQo4GbWQxgM57Aj0bQnrZipht1fwous+QIPduQ==
intl-locales-supported@^1.4.8:
version "1.5.0"
resolved "https://registry.yarnpkg.com/intl-locales-supported/-/intl-locales-supported-1.5.0.tgz#5025fb6bed369b30aa83e559cb892cf6881baacf"
integrity sha512-VYLdcF3Z4b8UZ7tj3hxz9auSjIxpm18NLoUlgvt4I78vrskxstKqfKQlsuFpGE+n2RNkqrwlYo3D9QcYSjx4NA==
intl-messageformat-parser@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-3.1.0.tgz#747e3dbafaf1c1fd07dffa6e4f54ed60e0336ca7"
integrity sha512-HUa6oLTy3Q+X0mpmk3g5as8WiM1F2AtssfsmNbFUu4yf+y/eD6aggpbnfjxT4uTJFL9JhcsE2gQfzAF2PTTsFg==
intl-messageformat-parser@^3.1.1, intl-messageformat-parser@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-3.2.0.tgz#de7ba62cdc8edc80d2b21eb5ada1728b0fdff198"
integrity sha512-07G+OTgIEsYIPpy793/EU14Slz03nqouODE+CGXlojw1gOF1IaUXk99EOlVdKsPwl95hUJon4dsp9D7/XPBDCw==
intl-messageformat@^7.2.0:
version "7.2.1"
resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-7.2.1.tgz#f65a327a62dd3f5e2477afe03dd61586c4242906"
integrity sha512-/y0t/q/Pt99YtIF0V21vCwtqbXntDcsbd38QVvaTOcEv4rvhl4erBWm6AJfCqspEDGGg0gFYdXmzlmjnfiKX8g==
intl-messageformat@^7.2.4:
version "7.3.1"
resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-7.3.1.tgz#896fc42b83cdd38da807fb9b5666cdafb09ee327"
integrity sha512-89uEUl55pBPZgLznTVpwva1OxitiIemanucu9NeoiGcAw6jMyFhPtPAPjaT64TwbA3zNxtQm30atWx+RY9jGXg==
dependencies:
intl-format-cache "^4.1.19"
intl-messageformat-parser "^3.1.0"
intl-format-cache "^4.2.1"
intl-messageformat-parser "^3.2.0"
intl@^1.2.5:
version "1.2.5"
@ -7657,20 +7657,20 @@ react-devtools-core@^3.6.1:
shell-quote "^1.6.1"
ws "^3.3.1"
react-intl@^3.1.6:
version "3.2.1"
resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-3.2.1.tgz#3563d10b4116d61eb3234137f23d71a99d8d68af"
integrity sha512-iFxPFsvgGoh94YQbc5H4VDCO7d16c78QXTUfJE4BlKFhuIejL0t+iC5n44529kJCihxGvyJy1HIqPZpIjhprGQ==
react-intl@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-3.3.1.tgz#b2f13b3340e1cc785f9899dce5dd5a3bd2aae00a"
integrity sha512-58W/IK645G9wiNhQjHg32y2S/qQj2ZjqRczxlO/F/snPbyg6XjVsnUCUgcpPndsvQhVICshIJxUIC5XuVeZOzw==
dependencies:
"@formatjs/intl-relativetimeformat" "^3.0.2"
"@formatjs/intl-unified-numberformat" "^0.4.9"
"@formatjs/intl-relativetimeformat" "^4.0.1"
"@formatjs/intl-unified-numberformat" "^0.5.2"
"@types/hoist-non-react-statics" "^3.3.1"
"@types/invariant" "^2.2.30"
hoist-non-react-statics "^3.3.0"
intl-format-cache "^4.1.19"
intl-locales-supported "^1.4.5"
intl-messageformat "^7.2.0"
intl-messageformat-parser "^3.1.0"
intl-format-cache "^4.1.22"
intl-locales-supported "^1.4.8"
intl-messageformat "^7.2.4"
intl-messageformat-parser "^3.1.1"
invariant "^2.1.1"
shallow-equal "^1.1.0"