Native navigation library for ReactNative, support navigating between native and ReactNative seamlessly.
To run the playground project, first clone this repo:
git clone [email protected]:listenzz/react-native-navigation-hybrid.git
cd react-native-navigation-hybridFirst, make sure that you have a simulator or device.
Then,
npm install
# &
npm startThen, in another CLI window:
npm run run:androidFirst,
npm install
# &
npm startThen, in another CLI window:
npm run run:ios- 使用原生导航组件实现 React Native 页面间的导航,不仅具有更优的性能,而且使得 RN 页面具有原生质感
- 原生页面和 RN 页面共享路由, 使得它们之间相互跳转和传值轻而易举
- 内置 drawer, tabs, stack 标准容器,同时支持自定义容器和导航
- 支持 deep link
| React Native version(s) | Supporting Navigation version(s) | 发布日期 |
|---|---|---|
| >= 0.60 | 0.17.15 | 2019/10/07 |
| < 0.60 | 0.16.9 | 2019/09/05 |
-
setRoot现在返回一个 Promise -
完善泛型支持
-
支持 React Hooks,在函数组件中,使用
useVisibleEffect代替componentDidAppear和componentDidDisappear,使用useResult代替onComponentResult,使用useBackEffect代替onBackPressed -
pushpresent和showModal现在返回一个 Promise
-
修复
unselectedIcon不生效的问题 -
现在可以通过
Garden.setRightBarButtonItem(null)移除 topBar 上的按钮 -
优化了
switchTab、setRoot的过渡效果 -
修复额外生命周期
componentDidAppear派发不准确的问题 -
[Android] 修复 Activity 冷重启的问题
-
[Android] 优化当应用从后台进入前台时的事务执行顺序
-
自定义 TabBar 传递的数据发生变化,详见 自定义 TabBar 文档
-
优化和
Garden相关的若干 api,详见 style 文档
-
修复和 react-native-code-push 协作偶尔导致的崩溃
-
Android 迁移到 Java 8
如果你的 app/build.gradle 没有以下配置,请加上
android {
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
}