Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is unmountOnBlur from Navigator.Screen options prop? #3440

Closed
thlindustries opened this issue Oct 26, 2022 · 2 comments · Fixed by #3446
Closed

Where is unmountOnBlur from Navigator.Screen options prop? #3440

thlindustries opened this issue Oct 26, 2022 · 2 comments · Fixed by #3446
Labels
BottomNavigation enhancement Hacktoberfest question Question related to the library, not an issue

Comments

@thlindustries
Copy link

thlindustries commented Oct 26, 2022

  • I was messing around with material-bottom-tabs and bottom-tabs and I realized that some attributes are missing into Screen's options prop from createMaterialBottomTabNavigator.

  • I was trying to use the unmountOnBlur attribute that I was already using while with createBottomTabNavigator but when I changed I got the type error saying that the attribute unmountOnBlur does not exists

Some version:

  "@react-navigation/bottom-tabs": "^6.4.0",
  "@react-navigation/core": "^6.4.0",
  "@react-navigation/material-bottom-tabs": "^6.2.4",
  "@react-navigation/native": "^6.0.13",
  "react": "18.1.0",
  "react-native": "0.70.3",

With the Screen component from '@react-navigation/material-bottom-tabs':
Err

With the Screen component from '@react-navigation/bottom-tabs':
Err

Expected:
The same attributes from @react-navigation/bottom-tabs into Screen options prop from material-bottom-tabs

@thlindustries thlindustries added the question Question related to the library, not an issue label Oct 26, 2022
@thlindustries
Copy link
Author

Also other attributes that I was using are miss typed like tabBarLabel, with the material-bottom-tabs it only can be a string, with the bottom-tabs it can be a string or a function that returns a ReactNode and receives some params like focused

@mohanataraj
Copy link

This issue exists in the latest version as well
error: Object literal may only specify known properties, and 'unmountOnBlur' does not exist in type 'BottomTabNavigationOptions

verisons;
"@react-navigation/bottom-tabs": "^7.2.0", "@react-navigation/material-top-tabs": "^7.1.0", "@react-navigation/native": "^7.0.14", "@react-navigation/native-stack": "^7.2.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BottomNavigation enhancement Hacktoberfest question Question related to the library, not an issue
Projects
None yet
3 participants