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

Failed prop type due to incorrect React Native version #2156

Closed
haruelrovix opened this issue Oct 27, 2019 · 4 comments · Fixed by #2378
Closed

Failed prop type due to incorrect React Native version #2156

haruelrovix opened this issue Oct 27, 2019 · 4 comments · Fixed by #2378
Milestone

Comments

@haruelrovix
Copy link
Contributor

Explain what you did

Found warnings on this build, #3300.

Expected behavior

No warning.

Describe the bug

See the Jest's log:

PASS src/checkbox/__tests__/CheckBox.js
  ● Console
    console.error node_modules/react/node_modules/prop-types/checkPropTypes.js:19
      Warning: Failed prop type: Invalid prop `accessibilityRole` of value `checkbox` supplied to `TouchableOpacity`, expected one of ["none","button","link","search","image","keyboardkey","text","adjustable","imagebutton","header","summary"].
          in TouchableOpacity
    console.error node_modules/react/node_modules/prop-types/checkPropTypes.js:19
      Warning: Failed prop type: Invalid prop `accessibilityStates[0]` of value `unchecked` supplied to `TouchableOpacity`, expected one of ["selected","disabled"].
          in TouchableOpacity
    console.error node_modules/react/node_modules/prop-types/checkPropTypes.js:19
      Warning: Failed prop type: Invalid prop `accessibilityStates[0]` of value `checked` supplied to `TouchableOpacity`, expected one of ["selected","disabled"].
          in TouchableOpacity

These warnings occurred because RNE still uses RN v0.59. Meanwhile, accessibilityRole: checkbox and accessibilityStates: checked are new in v.0.60.

Respective source code:

Your Environment (please complete the following information):

software version
react-native-elements 1.2.6
react-native 0.59.10
@iRoachie
Copy link
Collaborator

Yes I did see this. Not sure how we should resolve this.

@haruelrovix
Copy link
Contributor Author

@iRoachie the versioning documentation in React Native website is messed up 🤦‍♂

image

The accessibilityRole in 0.59 should stop in summary. Docs in screenshot should be for 0.60 and above.

@iRoachie
Copy link
Collaborator

Yea i brought it up on twitter. The react native docs are out of date, but the code has the changes.

facebook/react-native@7b35f42

@techgig17
Copy link

techgig17 commented May 28, 2020

So is there anyway to prevent this issue from coming up in ios. i am using rn elements v2.0.0 and use checkbox and on rn v 0.59.9.

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

Successfully merging a pull request may close this issue.

4 participants