Skip to content

Instantly share code, notes, and snippets.

@AllGistsEqual
Created April 18, 2021 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AllGistsEqual/5dfec555a7ccc7368ed63d2c79f9bce1 to your computer and use it in GitHub Desktop.
Save AllGistsEqual/5dfec555a7ccc7368ed63d2c79f9bce1 to your computer and use it in GitHub Desktop.
// File: src/screens/SettingsScreen.tsx
import React from 'react'
import { Text, View, StyleSheet, Button } from 'react-native'
import { MainNavigationProp } from '../routing/types'
import { MainRoutes } from '../routing/routes'
type SettingsScreenProps = {
navigation: MainNavigationProp<MainRoutes.Settings>
}
const SettingsScreen = ({ navigation }: SettingsScreenProps): React.ReactElement => (
<View style={styles.page}>
<Text>SETTINGS</Text>
<Button title="back" onPress={() => navigation.goBack()} />
</View>
)
const styles = StyleSheet.create({
page: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
})
export default SettingsScreen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment