1\安裝antd-mobile-rn 庫javascript
npm install antd-mobile-rn --save
二、按需加載java
npm install babel-plugin-import --save-dev
三、修改.babelrc配置以下react
{ "presets": [ "react-native" ], "plugins": [ [ "import", { "libraryName": "antd-mobile-rn" } ] ] }
四、引入組件npm
import { Button } from 'antd-mobile-rn';
五、使用組件react-native
<Button>6</Button>