-
Notifications
You must be signed in to change notification settings - Fork 321
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
Unexpected reserved type number #75
Comments
i have same issue . |
Its a dead package. Just use something else |
@ChinaYangYan have you resolved the issue? I instead it by other package ,try to 'yarn add react-native-wheel-pick'; |
@ChinaYangYan did you solve this issue? I met the same issue :( |
I fixed it by change "propTypes: {... " to "static propTypes = {...", I guess it's the react version issue maybe. |
Since this repo hasn't had any updates in 2 years, I went ahead and forked the repo and published the fork using Shelley's suggestion of updating the propTypes. You can view the updated repo at https://github.com/GregFrench/react-native-wheel-picker and install it using the command: This should fix your problem. Let me know if it helps. Cheers! |
We have a project use Hope, this info is useful. @ChinaYangYan |
@Rainsho Cool |
@GregFrench any motivation to update the forked repo [Fri Jun 12 2020 12:14:21.378] WARN Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.
Please update the following components: WheelCurvedPicker |
Can you explain what this is? Is this a warning message you get when using the latest version of React Native? Would be able to send a pull request with the updated changes and I'll take a look at it? I'm not really up to date on the latest versions of React/React Native so I'm not quite sure what changes would need to be made in order to remove the warning message while also having it still work on older versions of React Native. Thanks. |
Thanks for forking this Greg WheelCurvedPicker.ios.js componentWillReceiveProps (props) { becomes UNSAFE_componentWillReceiveProps (props) { That makes it fully backwards compatible. |
Thank you for the suggestion. I have patched the library and published it to NPM. Hopefully, this fixes the issue. |
It did! Thanks @GregFrench |
Hi @GregFrench , I'm facing with this issue on Android
|
It looks like the problem is occurring with "selectedValue={values[name] || value}" line. Is it possible you are using values with types of String instead of Number in your values array? |
@GregFrench yes, I think so, but sometimes the value should be String, so I think we need to improve this. I choose another library for Android side, btw |
import React, {Component} from 'react'; type Props = { For me it's throwing Syntax error can anyone help me with this . |
you are probably not using the same version of node or react for this package, no commits for 6 years |
error SyntaxError: \react-native-wheel-picker\WheelCurvedPicker.android.js: Unexpected reserved type number (39:22)
37 | textColor: ColorPropType,
38 |
The text was updated successfully, but these errors were encountered: