Slider组件已从React Native核心中提取并将被删除

inkz8wg9  于 2023-05-18  发布在  React
关注(0)|答案(1)|浏览(139)

警告指出,Slider组件已从React Native核心中提取,并将在未来版本中删除。建议从@react-native-community/slider而不是react-native安装和导入Slider组件。

klsxnrf1

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

相关问题