Skip to content

Instantly share code, notes, and snippets.

@Billmike
Created May 23, 2020 19:00
Show Gist options
  • Save Billmike/c4b529fecffdba35729fd456e9585f40 to your computer and use it in GitHub Desktop.
Save Billmike/c4b529fecffdba35729fd456e9585f40 to your computer and use it in GitHub Desktop.
const App = () => {
const { width, height } = Dimensions.get('window');
return (
<>
<StatusBar barStyle="dark-content" />
<SafeAreaView style={{ flex: 1 }}>
<ScrollView
style={{ flex: 1 }}
horizontal={true}
scrollEventThrottle={16}
pagingEnabled={true}
>
<View style={{ width, height }}>
<Text>Screen 1</Text>
</View>
<View style={{ width, height }}>
<Text>Screen 2</Text>
</View>
<View style={{ width, height }}>
<Text>Screen 3</Text>
</View>
<View style={{ width, height }}>
<Text>Screen 4</Text>
</View>
<View style={{ width, height }}>
<Text>Screen 5</Text>
</View>
</ScrollView>
</SafeAreaView>
</>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment