Skip to content

Commit

Permalink
Remove Picker deprecation warning
Browse files Browse the repository at this point in the history
Use @react-native-community/picker
  • Loading branch information
rickycodes committed Jun 23, 2021
1 parent ba57f18 commit f1da053
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/UI/SelectComponent/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { ScrollView, StyleSheet, Text, View, TouchableOpacity, Picker } from 'react-native';
import { ScrollView, StyleSheet, Text, View, TouchableOpacity } from 'react-native';
import { Picker } from '@react-native-community/picker';
import { fontStyles, colors, baseStyles } from '../../../styles/common';
import Icon from 'react-native-vector-icons/MaterialIcons';
import Modal from 'react-native-modal';
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"@react-native-community/cookies": "^4.0.1",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/netinfo": "6.0.0",
"@react-native-community/picker": "^1.8.1",
"@react-native-community/viewpager": "^3.3.0",
"@rnhooks/keyboard": "^0.0.3",
"@sentry/integrations": "6.3.1",
Expand Down
14 changes: 14 additions & 0 deletions patches/react-native+0.63.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/node_modules/react-native/ReactAndroid/src/androidTest/js/PickerAndroidTestModule.js b/node_modules/react-native/ReactAndroid/src/androidTest/js/PickerAndroidTestModule.js
index a4e0cc0..4f4c9ea 100644
--- a/node_modules/react-native/ReactAndroid/src/androidTest/js/PickerAndroidTestModule.js
+++ b/node_modules/react-native/ReactAndroid/src/androidTest/js/PickerAndroidTestModule.js
@@ -10,7 +10,8 @@
'use strict';

const React = require('react');
-const {NativeModules, Picker, View} = require('react-native');
+const {NativeModules, View} = require('react-native');
+const {Picker} = require('@react-native-community/picker');
const BatchedBridge = require('react-native/Libraries/BatchedBridge/BatchedBridge');

const {Recording: RecordingModule} = NativeModules;
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,11 @@
resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-6.0.0.tgz#2a4d7190b508dd0c2293656c9c1aa068f6f60a71"
integrity sha512-Z9M8VGcF2IZVOo2x+oUStvpCW/8HjIRi4+iQCu5n+PhC7OqCQX58KYAzdBr///alIfRXiu6oMb+lK+rXQH1FvQ==

"@react-native-community/picker@^1.8.1":
version "1.8.1"
resolved "https://registry.yarnpkg.com/@react-native-community/picker/-/picker-1.8.1.tgz#94f14f0aad98fa7592967b941be97deec95c3805"
integrity sha512-Sj9DzX1CSnmYiuEQ5fQhExoo4XjSKoZkqLPAAybycq6RHtCuWppf+eJXRMCOJki25BlKSSt+qVqg0fIe//ujNQ==

"@react-native-community/viewpager@^2.0.1":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@react-native-community/viewpager/-/viewpager-2.0.2.tgz#622b190294b1310c4825c98daeaee1c8443f7124"
Expand Down

0 comments on commit f1da053

Please sign in to comment.