Hybrid Navigation

Hybrid Navigationopen in new window是一款 React Native 导航组件,支持在 react 页面和原生页面之间无缝导航。

特性

  • 使用原生导航组件实现 React Native 页面间的导航,不仅具有更优的性能,而且使得 RN 页面具有原生质感
  • 原生页面和 RN 页面共享路由, 使得它们之间相互跳转和传值轻而易举
  • 内置 drawer, tabs, stack 标准容器,同时支持自定义容器和导航
  • 支持 deep link

README-2021-10-19-15-39-45

Support

versionreact-native version
1.0.0+0.60.0+

如果你使用 1.5.0 以上版本,需要修改 android/build.gradle 文件,添加 mavenCentral()

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        google()
        jcenter()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

Running the example project

To run the example project, first clone this repo:

git clone [email protected]:listenzz/hybrid-navigation.git
cd hybrid-navigation

run on Android

First, make sure that you have a simulator or device.

Then,

npm install
# &
npm start

Then, in another CLI window:

npm run run:android

Download demo apkopen in new window

或通过扫描二维码安装 demo

README-2021-10-19-15-58-19

run on iOS

First,

npm install
# &
cd ios && pod install
# &
npm start

Then, in another CLI window:

npm run run:ios

目录

上次更新: 11/17/2021, 9:39:34 AM