callstack / callstack/react-native-paper

Bottom Tab with expo-router 3

オープン
#4,346 コメント 5 件 リアクション 7 件 担当者 0 名 GitHub で見る
question
主要言語
TypeScript
スター
14.5k
フォーク
2.2k
平均マージ
5日 23時間
マージ済み PR(30日)
12

説明

Scouring from net I was able to have expo-router use react-native-paper bottom tabs. However `screenOptions` and `tabBarIcon` is having error in typescript.

```
import {
createMaterialBottomTabNavigator,
MaterialBottomTabNavigationOptions,
MaterialBottomTabNavigationEventMap,
} from "react-native-paper/react-navigation";

import { TabNavigationState, ParamListBase } from "@react-navigation/native";

import { withLayoutContext } from "expo-router";
import {
BottomTabNavigationEventMap,
BottomTabNavigationOptions,
} from "@react-navigation/bottom-tabs";

const BottomTabNavigator = createMaterialBottomTabNavigator().Navigator;

export const MaterialBottomTabs = withLayoutContext<
MaterialBottomTabNavigationOptions | BottomTabNavigationOptions,
typeof BottomTabNavigator,
TabNavigationState,
MaterialBottomTabNavigationEventMap | BottomTabNavigationEventMap
>(BottomTabNavigator);

```

What is the proper way of integrating expo-router to react-native-paper's bottom tab without having to resolve to using any on `screenOptions` and manually typing the `tabBarIcon` option

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。