按照官网的教程
create-react-native-app的方法 尝试的开发了react-native
这阶段是没问题的,远程调试也行得通
不过不知如何引入antd-mobile
我用了 yarn eject 转换成了react-native工程
然后yarn add antd-mobile
yarn add babel-plugin-import --dev
{
"presets": ["babel-preset-expo"],
"plugins": [["import", { "libraryName": "antd-mobile" }]],
"env": {
...
}
}
依次下来 按照官网的demo 引入button是没问题的
但是 如何引入其他组件
例如我引入了TabBar 组件
react-native run-ios
错误如下
为什么我用 create-react-native创建的项目,引入第三方总是报错
uable resolve 'xxx' from 'App.js'