版本 | 升级指南 |
---|---|
0.60+ | 内置组件移除 |
$ npm i @react-sextant/upgrade-auto
$ npm run upgrade-components
安装成功后 package.json将会被自动修改
⚠️ 那些被移除的内置组件,需要在package.json
中的upgradeDependencies
字段中添加对应替换的npm包名
{
"name": "xxx",
"version": "0.0.1",
"scripts": {
...
+ "upgrade-components": "node node_modules/@react-sextant/upgrade-auto/upgrade-components.js"
},
...
+ "upgradeDependencies": {
+ "NavigationActions": "@react-navigation/compat > react-navigation",
+ "ART": "import * as ART from '@react-native-community/art'",
+ "WebView": "react-native-webview",
+ "NetInfo": "@react-native-community/netinfo",
+ "CameraRoll": "@react-native-community/cameraroll",
+ "ImageEditor": "@react-native-community/image-editor",
+ "ViewPagerAndroid": "@react-native-community/viewpager"
+ }
}
常见问题1:
'WebView has been removed from React Native. It can now be installed and imported from 'react-native-webview' instead of 'react-native'. " See https://github.com/react-native-community/react-native-webview',
https://github.com/react-native-community/releases/blob/master/CHANGELOG.md#removed-3
- fork+自己维护
- 使用本脚步自动更新(适用于仅仅改个组件依赖方式)
- import {WebView, Button} from 'react-native' + import {Button} from 'react-native' + import {WebView} from 'react-native-native'