MCPcopy Create free account
hub / github.com/callstackincubator/polygen / Examples

Function Examples

apps/example/src/App.tsx:54–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52const Stack = createStackNavigator();
53
54function Examples() {
55 const navigation = useNavigation();
56 return (
57 <ScrollView>
58 {examples
59 .filter((example) =>
60 'platform' in example ? example?.platform === Platform.OS : example
61 )
62 .map((example) => (
63 <TouchableOpacity
64 key={example.title}
65 testID={example.title}
66 style={styles.exampleTouchable}
67 onPress={() => {
68 //@ts-ignore
69 navigation.navigate(example.title);
70 }}
71 >
72 <Text style={styles.exampleText}>{example.title}</Text>
73 </TouchableOpacity>
74 ))}
75 </ScrollView>
76 );
77}
78
79const examplesForPlatform = examples
80 .filter((example) =>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected