Last active
September 29, 2018 19:46
-
-
Save janhesters/cb59531ccfdf78081ff59417dab94d5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... imports, remember to omit NavigationScreenProp without TypeScript | |
| import { Button, Icon } from "react-native-elements"; | |
| import { NavigationScreenProp } from "react-navigation"; | |
| interface Props { | |
| navigation: navigation: NavigationScreenProp<any, any>; | |
| } | |
| class HomeScreen extends Component<Props, object> { | |
| // ... navigationOptions | |
| render() { | |
| const { navigate } = this.props.navigation; | |
| return ( | |
| <View style={styles.container}> | |
| <Text>This is the HomeScreen.</Text> | |
| <Button title="Details" onPress={() => navigate("DetailScreen")} /> | |
| <Button title="Options" onPress={() => navigate("OptionsScreen")} /> | |
| </View> | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment