-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Native Touchable* not working anymore (1.10.0) #1338
Copy link
Copy link
Closed
Description
Description
Since the 1.10.0 upgrade the Touchable* components are not working anymore on Android, meaning they don't switch states, don't show visual feedback, and don't call onPress events.
Everything is working as expected on iOS.
Screenshots
Steps To Reproduce
- Use TouchableOpacity from RNGH in 1.9.0, note how it works
- Use TouchableOpacity from RNGH in 1.10.0, note how it doesn't work anymore
Expected behavior
I expect it to work.
Actual behavior
It doesn't work.
Snack or minimal code example
import React from "react";
import "react-native-gesture-handler";
import { Text, View } from "react-native";
import { Navigation } from "react-native-navigation";
import { PressableOpacity } from "./src/common/components/pressables/PressableOpacity"; // <-- that's a RN <Pressable> with opacity effect
import {
gestureHandlerRootHOC,
TouchableOpacity,
} from "react-native-gesture-handler";
const App = () => {
console.log("Re-rendering App...");
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<Text>Hello world!</Text>
<PressableOpacity
style={{ width: 100, height: 50, backgroundColor: "blue" }}
onPress={() => console.log("js")}
/>
<TouchableOpacity
disabled={false}
style={{ width: 100, height: 50, backgroundColor: "red" }}
onPress={() => console.log("rngh")}
/>
</View>
);
};
Navigation.registerComponent(
"Home",
() => gestureHandlerRootHOC(App),
() => App
);
Navigation.setRoot({
root: {
component: {
name: "Home",
},
},
});Package versions
- React: 17.0.1
- React Native: 0.64.0-rc.3
- React Native Gesture Handler: 1.10.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels