-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
Picker.Item with element value crashes (re-opening #17812) #18086
Comments
According to the source code, Picker.Item's value should be an integer or a string. It has no mention of an element being supported here. Closing as this appears to be working as intended. |
Crashing the app is working as intended? |
I've already pointed out the error in your code. I think that speaks for itself. |
Are you for real right now? If you threw an exception, sure. If you rendered garbage, sure. If you did literally anything other take down the entire app so hard it can't even send a crash report, sure. |
Is this a bug report?
Yes.
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: Windows 10
Node: 6.12.3
Yarn: 1.3.2
npm: 3.10.10
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.3 => 0.53.3
Steps to Reproduce
After
react-native init
, replaceApp.js
with:Expected Behavior
I would like to get the element to render from
Picker#onValueChange
.Actual Behavior
When testing in android emulator, crashes on startup (i.e. closes and shows "ProjectName has stopped" dialog)
Reproducible Demo
From the previous issue, https://snack.expo.io/BJ7CILeUM but Snack behavior is a little different, it complains about missing a
render()
method, but converted to using a component class, the error shows:The text was updated successfully, but these errors were encountered: