I have <TouchableOpacity> components in my React Native app that all have associated callbacks. These work fine on iOS, and fine on Android if I don't have the device set to debug. But when I do have it set to debug, the elements do change opacity when clicked, but the callbacks aren't called.
Does anyone know how I can approach this?
Notes
React Native Debugger, and when I just use the default debugger that appears in Chrome when I click debug in the developer options.Galaxy A30 I'm testing on.[email protected]I can confirm that the bug exists, you can even reproduce it with this very simple example :
import React from "react";
import { TouchableOpacity, View, Text } from "react-native";
class App extends React.Component {
render() {
console.log("Logged in debugger.");
return <TouchableOpacity
onPress={() => console.log("No log in debugger.")}>
<View style={{height: 200, width: 200, backgroundColor: 'blue'}}>
<Text>Test</Text>
</View>
</TouchableOpacity>;
}
}
export default App;
Here is my config :
Possible solution found here on github. It seems like the problem is related to desynchronisation between debugger host time and your device time. It worked for me at least (disabling automatic time synchronisation and enabling it) but it didn't worked for a colleague (his phone is a P40 lite).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With