diff --git a/app/app.tsx b/app/app.tsx index 88ddab5d8..81f90068a 100644 --- a/app/app.tsx +++ b/app/app.tsx @@ -8,7 +8,6 @@ import { AppRegistry, Linking, Platform, - YellowBox, } from "react-native" import { enableScreens } from "react-native-screens" import RNExitApp from "react-native-exit-app" @@ -38,15 +37,6 @@ if (Platform.OS === "ios") { enableScreens() } -/** - * Ignore some yellowbox warnings. Some of these are for deprecated functions - * that we haven't gotten around to replacing yet. - */ -YellowBox.ignoreWarnings([ - "componentWillMount is deprecated", - "componentWillReceiveProps is deprecated", -]) - /** * Storybook still wants to use ReactNative's AsyncStorage instead of the * react-native-community package; this causes a YellowBox warning. This hack diff --git a/app/components/switch/switch.tsx b/app/components/switch/switch.tsx index 8b85394bb..c8978896f 100644 --- a/app/components/switch/switch.tsx +++ b/app/components/switch/switch.tsx @@ -70,7 +70,7 @@ export class Switch extends React.PureComponent { }).start() } - componentWillReceiveProps(newProps: SwitchProps) { + UNSAFE_componentWillReceiveProps(newProps: SwitchProps) { if (newProps.value !== this.props.value) { this.startAnimation(newProps.value) } diff --git a/app/components/table-view/table-view.tsx b/app/components/table-view/table-view.tsx index 3670a2c2d..c0362cf06 100644 --- a/app/components/table-view/table-view.tsx +++ b/app/components/table-view/table-view.tsx @@ -23,9 +23,9 @@ export function TableView({ {React.Children.map(newChildren, (child, index) => { const cloneChild = React.cloneElement( - child, + child as React.ReactElement, { - ...child.props, + ...(child as React.ReactElement).props, isFirstCell: index === 0, isLastCell: index === newChildren.length - 1, } diff --git a/package.json b/package.json index 35ded9d32..553fd6e61 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "postinstall-postinstall": "^2.1.0", "process": "^0.11.10", "ramda": "0.26.1", - "react": "16.8.6", + "react": "17.0.2", "react-content-loader": "^4.3.4", "react-native": "0.60.5", "react-native-actions-sheet": "^0.4.8", @@ -112,7 +112,7 @@ "@types/crypto-js": "^4.1.1", "@types/jest": "24.0.16", "@types/ramda": "0.26.18", - "@types/react": "16.8.23", + "@types/react": "17.0.2", "@types/react-native": "0.60.2", "@types/react-test-renderer": "16.8.3", "@types/styled-components": "^5.1.9", @@ -143,7 +143,7 @@ "react-native-dotenv": "^0.2.0", "react-native-svg-transformer": "^0.13.0", "react-powerplug": "1.0.0", - "react-test-renderer": "16.8.6", + "react-test-renderer": "17.0.2", "rimraf": "2.6.3", "solidarity": "2.3.1", "typescript": "3.9.10" diff --git a/yarn.lock b/yarn.lock index a921df01e..a2597c7e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3240,13 +3240,13 @@ "@types/prop-types" "*" csstype "^2.2.0" -"@types/react@16.8.23": - version "16.8.23" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.23.tgz#ec6be3ceed6353a20948169b6cb4c97b65b97ad2" - integrity sha512-abkEOIeljniUN9qB5onp++g0EY38h7atnDHxwKUFz1r3VH1+yG1OKi2sNPTyObL40goBmfKFpdii2lEzwLX1cA== +"@types/react@17.0.2": + version "17.0.2" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.2.tgz#3de24c4efef902dd9795a49c75f760cbe4f7a5a8" + integrity sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA== dependencies: "@types/prop-types" "*" - csstype "^2.2.0" + csstype "^3.0.2" "@types/source-list-map@*": version "0.1.2" @@ -13033,12 +13033,17 @@ react-hotkeys@2.0.0: dependencies: prop-types "^15.6.1" +"react-is@^16.12.0 || ^17.0.0 || ^18.0.0": + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + react-is@^16.13.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: +react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4: version "16.9.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb" integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw== @@ -13048,6 +13053,11 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== +react-is@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" @@ -13379,6 +13389,14 @@ react-refresh@^0.4.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.0.tgz#d421f9bd65e0e4b9822a399f14ac56bda9c92292" integrity sha512-bacjSio8GOtzNZKZZM6EWqbhlbb6pr28JWJWFTLwEBKvPIBRo6/Ob68D2EWZA2VyTdQxAh+TRnCYOPNKsQiXTA== +react-shallow-renderer@^16.13.1: + version "16.15.0" + resolved "https://registry.yarnpkg.com/react-shallow-renderer/-/react-shallow-renderer-16.15.0.tgz#48fb2cf9b23d23cde96708fe5273a7d3446f4457" + integrity sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA== + dependencies: + object-assign "^4.1.1" + react-is "^16.12.0 || ^17.0.0 || ^18.0.0" + react-sizeme@^2.6.7: version "2.6.12" resolved "https://registry.yarnpkg.com/react-sizeme/-/react-sizeme-2.6.12.tgz#ed207be5476f4a85bf364e92042520499455453e" @@ -13400,15 +13418,15 @@ react-syntax-highlighter@^11.0.2: prismjs "^1.8.4" refractor "^2.4.1" -react-test-renderer@16.8.6: - version "16.8.6" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.8.6.tgz#188d8029b8c39c786f998aa3efd3ffe7642d5ba1" - integrity sha512-H2srzU5IWYT6cZXof6AhUcx/wEyJddQ8l7cLM/F7gDXYyPr4oq+vCIxJYXVGhId1J706sqziAjuOEjyNkfgoEw== +react-test-renderer@17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-17.0.2.tgz#4cd4ae5ef1ad5670fc0ef776e8cc7e1231d9866c" + integrity sha512-yaQ9cB89c17PUb0x6UfWRs7kQCorVdHlutU1boVPEsB8IDZH6n9tHxMacc3y0JoXOJUsZb/t/Mb8FUWMKaM7iQ== dependencies: object-assign "^4.1.1" - prop-types "^15.6.2" - react-is "^16.8.6" - scheduler "^0.13.6" + react-is "^17.0.2" + react-shallow-renderer "^16.13.1" + scheduler "^0.20.2" react-textarea-autosize@^7.1.0: version "7.1.2" @@ -13426,15 +13444,13 @@ react-transform-hmr@^1.0.4: global "^4.3.0" react-proxy "^1.1.7" -react@16.8.6: - version "16.8.6" - resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" - integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw== +react@17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" + integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.6" react@^16.8.3: version "16.9.0" @@ -14120,14 +14136,6 @@ scheduler@0.14.0: loose-envify "^1.1.0" object-assign "^4.1.1" -scheduler@^0.13.6: - version "0.13.6" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" - integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196"