Last active
July 11, 2025 09:43
-
-
Save gigobyte/70903354799073ba0f9f657d0ffc3f48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Test() { | |
| const [shown, setShown] = useState(true) | |
| if (!shown) { | |
| return ( | |
| <Pressable | |
| key="1" | |
| testID="other-pressable" | |
| style={{ width: 30, height: 30, backgroundColor: 'red' }} | |
| onPress={() => console.log('pressed')} | |
| /> | |
| ) | |
| } | |
| return ( | |
| <Pressable key="2" testID="bad-pressable" onPress={() => {}}> | |
| <TextInput | |
| style={{ backgroundColor: 'green', width: 100, height: 30 }} | |
| onSubmitEditing={() => setShown(false)} | |
| /> | |
| </Pressable> | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment