-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
42 lines (38 loc) · 928 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React from "react";
import { ScrollView, StyleSheet, Text, View } from "react-native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { NavigationContainer } from "@react-navigation/native";
const { Navigator, Screen } = createNativeStackNavigator();
function Home() {
return (
<ScrollView>
{new Array(40).fill(0).map((_, i) => (
<View key={i} style={[styles.item, i % 2 && styles.odd]} />
))}
</ScrollView>
);
}
export default function App() {
return (
<NavigationContainer>
<Navigator>
<Screen
name="Home"
component={Home}
options={{
headerLargeTitle: true,
}}
/>
</Navigator>
</NavigationContainer>
);
}
const styles = StyleSheet.create({
item: {
height: 100,
backgroundColor: "#41b87a",
},
odd: {
backgroundColor: "#333333",
},
});