We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Yes
Environment: OS: macOS Sierra 10.12.6 Node: v8.2.1 Yarn: NO npm: 5.5.1 Watchman: 4.9.0 Xcode: Version 8.3.3 (8E3004b) Android Studio: NO
Packages: (wanted => installed) react-native: 0.25.1 react: ^0.14.9
Target Platform: iOS (10.3)
(Write your steps here:)
componentDidMount() { //Alert.alert('xx',this.state.user.FName+' ') this.watchID = navigator.geolocation.watchPosition((position) => { var lastPosition = JSON.stringify(position); this.setState({ lastPosition }); }); console.log('this.watchID') console.log(this.watchID) }
**componentWillUnmount() { // here is the bug** navigator.geolocation.clearWatch(this.watchID); }
when unmount , appear this error _reactNative.DeviceEventEmitter.removeListener is not a function
_reactNative.DeviceEventEmitter.removeListener is not a function
(Write what you thought would happen.)
componentWillUnmount() { try { navigator.geolocation.clearWatch(this.watchID); debugger; } catch (error) { console.log(error) } // debugger; }
(Write what happened. Add screenshots!)
(Paste the link to an example project and exact instructions to reproduce the issue.)
The text was updated successfully, but these errors were encountered:
Hey! 0.25.1 is quite old at this point. Please try a newer version and submit a new issue if needed.
Sorry, something went wrong.
No branches or pull requests
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: v8.2.1
Yarn: NO
npm: 5.5.1
Watchman: 4.9.0
Xcode: Version 8.3.3 (8E3004b)
Android Studio: NO
Packages: (wanted => installed)
react-native: 0.25.1
react: ^0.14.9
Target Platform: iOS (10.3)
Steps to Reproduce
(Write your steps here:)
componentDidMount() { //Alert.alert('xx',this.state.user.FName+' ') this.watchID = navigator.geolocation.watchPosition((position) => { var lastPosition = JSON.stringify(position); this.setState({ lastPosition }); }); console.log('this.watchID') console.log(this.watchID) }
**componentWillUnmount() { // here is the bug** navigator.geolocation.clearWatch(this.watchID); }
when unmount , appear this error
_reactNative.DeviceEventEmitter.removeListener is not a function
Expected Behavior
I don't want upgrade RN to other version,because it will occur lots of error,that's too bad!
(Write what you thought would happen.)
I do catch error,but can't catch the error
(Write what happened. Add screenshots!)
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
The text was updated successfully, but these errors were encountered: