ReactNative第三方控件

  1. 第三方控件的使用步骤:(以react-native-swiper为例)
  2. 安装模块:
//在项目的根目录下运行命令
npm i react-native-swiper --save
//执行完该命令后可以在项目的(/node_modules)目录下看到(react-native-swiper)文件夹,说明第三方控件下载成功
//然后打开(package.json)文件,可以看到以下代码,则说明依赖添加成功
"dependencies": {
    "react-native-swiper": "^1.5.4"
  }
  1. 查看下载控件的信息
npm view react-native-swiper
  1. 删除控件
//--save会删除(package.json)文件中的依赖
npm rm react-native-swiper --save
  1. 常用第三方控件
  2. swiper(banner):
  3. react-native-swiper
  4. Dialog
  5. react-native-dialog
  6. react-native-dialogs
  7. TabBar:
  8. react-native-tab-navigator
  9. side-menu:(侧滑菜单)
  10. react-native-side-menu

你可能感兴趣的:(ReactNative第三方控件)