callstack / callstack/react-native-paper
createMaterialBottomTabNavigator return type is any
- Langage dominant
- TypeScript
- Étoiles
- 14.5k
- Forks
- 2.2k
- Merge moyen
- 5 j 23 h
- PR mergées (30 j)
- 12
Description
### Current behaviour
Using `createMaterialBottomTabNavigator` from ` "react-native-paper/react-navigation"` returns fully functional Tab navigator, but with `any` type, making it impossible to work with using Typescript.
### Expected behaviour
It should return something which will allow Intelisense to work as it should: e.g. it should instruct user to use `` or to use `component` prop in ``
### How to reproduce?
```tsx
import TabBarIcon from "@/src/components/TabBarIcon";
import { createMaterialBottomTabNavigator } from "react-native-paper/react-navigation";
import MessagesRoute from "./messages";
import Notifications from "./notifications";
const Tabs = createMaterialBottomTabNavigator();
export default function CommunicationLayout() {
return (
}}
/>
undefined }}
/>
);
}
```
### Preview

### What have you tried so far?
There is no easy solution for that. I tried installing `react-navigation` and importing types, but it didn't help.
### Your Environment
| software | version
| --------------------- | -------
| ios | x
| android | 13
| react-native | latest
| react-native-paper | latest
| node | 22.13.1
| npm or yarn | pnpm - latest
| expo sdk | 53
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par l’export createMaterialBottomTabNavigator de react-native-paper/react-navigation et reproduisez l’exemple TypeScript de l’issue. Suivez les définitions de types du navigator renvoyé et vérifiez que Tabs.Navigator et Tabs.Screen fournissent IntelliSense et permettent l’utilisation de composants typés sans renvoyer any.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- react-native, typescript
- Domaine
- mobile
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100