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

MaterialTopTabNavigator warning on 'bounces' prop of AndroidPager #5914

Closed
ElChurros opened this issue May 16, 2019 · 10 comments
Closed

MaterialTopTabNavigator warning on 'bounces' prop of AndroidPager #5914

ElChurros opened this issue May 16, 2019 · 10 comments
Assignees

Comments

@ElChurros
Copy link

Current Behavior

I am running a very simple mobile application in which i am using a MaterialTopTabNavigator to navigate between 3 different screens.
When testing on iOS, the application runs without any warning. On Android, a warning is displayed in the emulator indicating :
Warning: Failed prop type: The prop 'bounces' is marked as required in 'PagerAndroid', but it's value is 'undefined'.

Here is a screenshot of the complete warning message :
image

Expected Behavior

Of course I would expect it to run without any warnings.

How to reproduce

Here is an example app that generates this warning :

https://github.com/ElChurros/TabNavigatorIssue.git

To reproduce the warning :

  • clone the repository
  • navigate to the cloned repo
  • run npm install
  • launch an Android emulator
  • run react-native run-android

Your Environment

software version
react-navigation "^3.9.2"
react-native "0.59.8"
node v12.2.0
npm or yarn 6.9.0
@chohonest
Copy link

I am having this exact warning.

@brentvatne
Copy link
Member

cc @satya164

@spyshower
Copy link

I see this got closed, but for me the error is not fixed. I get this error for PagerPan instead of PagerAndroid though.

@vizfiz
Copy link

vizfiz commented May 19, 2019

Found the root of this under

react-native-tab-view --> src folder --> PropTypes line 43, bounces: PropTypes.bool.isRequired

I removed the .isRequired. Doesn't seem like it should be a required prop

Yet to uncover what impact this has upstream in react navigation...

@Abdalmajid
Copy link

Found the root of this under

react-native-tab-view --> src folder --> PropTypes line 43, bounces: PropTypes.bool.isRequired

I removed the .isRequired. Doesn't seem like it should be a required prop

Yet to uncover what impact this has upstream in react navigation...

this fix the issue, Thanks

@satya164
Copy link
Member

Please upgrade your react-navigation version. The line isn't there.

@ElChurros
Copy link
Author

Please upgrade your react-navigation version. The line isn't there.

Hi, I did, but the warning remains with react-navigation 3.11.0. Tried in both my app and my minimal example.

@satya164
Copy link
Member

try deleting your node_modules and install again and clear metro cache with react-native start --reset-cache. the latest version doesn't even have this line in PagerPan or PagerAndroid, so it's not possible for it to show a warning.

@ElChurros
Copy link
Author

@satya164 Perfect the reset-cache was the trick. Thank you for the quick fix on this issue.

@hadpro24
Copy link

hadpro24 commented May 23, 2019

@satya164 thank you, it's works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants