({
title,
children,
}: {
title: string;
children?: React.ReactNode;
})
| 7 | } |
| 8 | |
| 9 | function MyScreen({ |
| 10 | title, |
| 11 | children, |
| 12 | }: { |
| 13 | title: string; |
| 14 | children?: React.ReactNode; |
| 15 | }) { |
| 16 | function push() { |
| 17 | navigation.stack.push( |
| 18 | <Stack.Screen> |
| 19 | <MyScreen title="Pushed screen"> |
| 20 | <Button title="Pop screen" onPress={pop} /> |
| 21 | </MyScreen> |
| 22 | </Stack.Screen> |
| 23 | ); |
| 24 | } |
| 25 | |
| 26 | function pop() { |
| 27 | navigation.stack.pop(); |
| 28 | } |
| 29 | |
| 30 | return ( |
| 31 | <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}> |
| 32 | <Text>{title}</Text> |
| 33 | <Button title="Push screen" onPress={push} /> |
| 34 | {children} |
| 35 | </View> |
| 36 | ); |
| 37 | } |
nothing calls this directly
no outgoing calls
no test coverage detected