callstack / callstack/react-native-paper

Bottom Tab with expo-router 3

Ouverte
#4,346 5 commentaires 7 réactions 0 personnes assignées Voir sur GitHub
question
Langage dominant
TypeScript
Étoiles
14.5k
Forks
2.2k
Merge moyen
5 j 23 h
PR mergées (30 j)
12

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.