Last active
August 26, 2017 19:15
-
-
Save aaronblondeau/f9e63c279b0ed71c99a7e5d8af0dec4c to your computer and use it in GitHub Desktop.
Initial version of where2ride home screen component
This file contains 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
import React, { Component } from 'react'; | |
import { | |
StyleSheet, | |
} from 'react-native'; | |
import { Container, Content, Button, Text } from 'native-base'; | |
import {observer} from 'mobx-react'; | |
import applicationState from '../ApplicationState' | |
@observer | |
export default class HomeScreen extends Component { | |
static navigationOptions = ({ navigation }) => ({ | |
title: 'React Native Quickly', | |
}); | |
render() { | |
const { navigate } = this.props.navigation; | |
return ( | |
<Container> | |
<Content> | |
<Button onPress={() => applicationState.clicks = applicationState.clicks + 1 }> | |
<Text>Get Stuff!</Text> | |
</Button> | |
<Text>{ applicationState.clicks }</Text> | |
<Button onPress={() => navigate('Detail', { name: 'Thing 2', description: "It is a thing." }) }> | |
<Text>Open</Text> | |
</Button> | |
</Content> | |
</Container> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment