Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 553 Bytes

react native 路由实践.md

File metadata and controls

34 lines (23 loc) · 553 Bytes

react native 路由实践

初始化 react-navigation

  1. 安装必要依赖
yarn add @react-navigation/native react-native-safe-area-context react-native-screens
  1. 处理 IOS 环境

  2. 链接依赖

npx pod-install ios
  1. 处理 Android 环境

  2. android/app/src/main/java/<your package name>/MainActivity.java 中加入

import android.os.Bundle;
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(null);
}

配置底部 Tab 导航与 header 标题