callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.98k stars 2.1k forks source link

Problem with the "BottomNavigation.Bar" component example (route.title) #4453

Open Tarac21 opened 4 months ago

Tarac21 commented 4 months ago

Current behaviour

The title in route.title is displayed in red to indicate that there is an error.

TS2339: Property title does not exist on type NavigationRoute<ParamListBase, string>

Suppress with @ts-ignore | More actions...

title?: string | undefined

react-native-paper

Expected behaviour

No error message is displayed.

How to reproduce?

Redo the example from https://callstack.github.io/react-native-paper/docs/components/BottomNavigation/BottomNavigationBar.

Preview

What have you tried so far?

Using @ts-ignore does not change anything.

Your Environment

software version
IntelliJ IDEA 2024.1.4 (Ultimate Edition)
android 14
react-native 0.74.3
react-native-paper ^5.12.3
node 20.15.0
npm 10.8.2
expo sdk ?
gedu commented 4 months ago

Hey, can you provider some code? the I just copy and paste the code from Example into a .tsx and is working

alienzhangyw commented 3 months ago

Hey, can you provider some code? the I just copy and paste the code from Example into a .tsx and is working

Here's the error: image

VSCode says the type of route is NavigationRoute<ParamListBase, string>, which doesn't have the property of title.

SectionTN commented 2 months ago

same issue

shrsthameet commented 1 month ago

Any updates on this issue. I am getting the same issue.