// counter_screen.js
import React, { Component, PropTypes } from 'react'
import { Text, View, StyleSheet } from 'react-native'
import Button from 'react-native-button'
import { observer } from 'mobx-react/native'
import ApplicationStyles from '../styles'
import Icon from 'react-native-vector-icons/FontAwesome'
@observer
export default class CounterScreen extends Component {
render() {
return (
<View>
<Text>Clicked: <Text>{this.props.counterStore.counter}</Text> times</Text>
<Button style={ApplicationStyles.button} onPress={() => this.props.counterStore.increment()}>
| +1 |
</Button>
<Button style={ApplicationStyles.button} onPress={() => this.props.counterStore.incrementAsync()}>
| +1 async |
</Button>
</View>
)
}
}