React Native 相关依赖库由 unimodules 升级至 expo #11565
Replies: 5 comments 4 replies
-
Taro Native Shell 升级至 expohttps://github.com/NervJS/taro-native-shell/tree/0.67.0-expo 0.68 支持https://github.com/NervJS/taro-native-shell/tree/0.68.0 |
Beta Was this translation helpful? Give feedback.
-
Taro Project Template 升级至 expo3.5 以下会使用 https://github.com/NervJS/taro-project-templates/tree/v3.4/react-native 3.5 会使用 https://github.com/NervJS/taro-project-templates/tree/v3.5/react-native |
Beta Was this translation helpful? Give feedback.
-
如使用的 taro 版本与 壳工程不对应,则需要锁定版本。 unimodules{
"resolutions": {
"expo-av": "~9.2.3",
"expo-barcode-scanner": "~10.2.2",
"expo-brightness": "~9.2.2",
"expo-camera": "~11.2.2",
"expo-file-system": "~11.1.3",
"expo-image-picker": "~10.2.3",
"expo-keep-awake": "~9.2.0",
"expo-location": "~12.1.3",
"expo-permissions": "~12.1.1",
"expo-sensors": "~10.2.2"
}
} expo (RN 67){
"resolutions": {
"expo-av": "~11.2.3",
"expo-barcode-scanner": "~11.3.0",
"expo-brightness": "~10.2.0",
"expo-camera": "~12.2.0",
"expo-file-system": "~14.0.0",
"expo-image-picker": "~13.1.1",
"expo-keep-awake": "~10.1.1",
"expo-location": "~14.0.2",
"expo-sensors": "~11.2.0",
}
} expo (RN 68){
"resolutions": {
"expo-av": "~11.2.3",
"expo-barcode-scanner": "~11.3.0",
"expo-brightness": "~10.2.0",
"expo-camera": "~12.2.0",
"expo-file-system": "~14.0.0",
"expo-image-picker": "~13.1.1",
"expo-keep-awake": "~10.1.1",
"expo-location": "~14.0.2",
"expo-sensors": "~11.3.0",
}
} |
Beta Was this translation helpful? Give feedback.
-
Taro Playground 升级至 expo分支 https://github.com/wuba/taro-playground/tree/releases/v1.5.0 |
Beta Was this translation helpful? Give feedback.
-
Taro 主仓库升级至 expo3.5 分支升级 https://github.com/NervJS/taro/tree/feat/3.5 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
概述
Taro React Native 相关依赖库由 unimodules 升级至 expo。
0.67 版本作为过渡,提供 unimodules 和 expo 双支持。
0.68 版本以后,仅保留 expo 支持。
动机
Expo 是 React Native 生态中的重要角色,提供了比较多的优秀模块,在 Taro 中有较广泛的使用,如
expo-av
expo-camera
expo-barcode-scanner
等,将来我们还会持续接入新的模块。从 Expo SDK 43 开始,react-native-unimodules 包已被弃用,模块系统和自动链接的实现现在改用 expo 包。其架构变更原因可参考该文章 What’s new in Expo modules infrastructure。
React Native 的生态,仍然处于高速迭代的状态。Taro 的策略是尽可能地与其保持一致节奏,以便开发者更快地获得新特性。
使用案例
将 Taro 升级至最新版,将原生代码根据相关pr进行变更。
详细设计
规范原生依赖
Taro 主仓库升级至 expo
expo-av
,expo-barcode-scanner
,expo-sensors
等所有依赖升级至最新版。Taro Native Shell 升级至 expo
Taro Project Template 升级至 expo
Taro Playground 升级至 expo
缺陷
替代选择
N/A
适配策略
Beta Was this translation helpful? Give feedback.
All reactions