警告指出,Slider组件已从React Native核心中提取,并将在未来版本中删除。建议从@react-native-community/slider而不是react-native安装和导入Slider组件。
@react-native-community/slider
react-native
klsxnrf11#
转到:/Volumes/code/projects/mobile/yourAppName/node_modules/react-native-color-picker/dist/HoloColorPicker.js并删除从react-native导入的Slider,并添加以下内容:import Slider from "@react-native-community/slider";对以下对象执行相同操作:/Volumes/code/projects/mobile/yourAppName/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
/Volumes/code/projects/mobile/yourAppName/node_modules/react-native-color-picker/dist/HoloColorPicker.js
Slider
import Slider from "@react-native-community/slider";
/Volumes/code/projects/mobile/yourAppName/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
1条答案
按热度按时间klsxnrf11#
转到:
/Volumes/code/projects/mobile/yourAppName/node_modules/react-native-color-picker/dist/HoloColorPicker.js
并删除从
react-native
导入的Slider
,并添加以下内容:import Slider from "@react-native-community/slider";
对以下对象执行相同操作:
/Volumes/code/projects/mobile/yourAppName/node_modules/react-native-color-picker/src/HoloColorPicker.tsx