Created
August 26, 2017 19:16
-
-
Save aaronblondeau/3b4dffa7436cd87b3845d7d39e28a41b to your computer and use it in GitHub Desktop.
Item Detail 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, Icon } from 'native-base'; | |
import {observer} from 'mobx-react'; | |
import applicationState from '../ApplicationState' | |
import { NavigationActions } from 'react-navigation' | |
@observer | |
export default class DetailScreen extends Component { | |
static navigationOptions = ({ navigation }) => ({ | |
title: navigation.state.params.name, | |
}); | |
render() { | |
const { dispatch } = this.props.navigation; | |
const { params } = this.props.navigation.state; | |
const backAction = NavigationActions.back({}); | |
return ( | |
<Container> | |
<Content> | |
<Text>{params.description}</Text> | |
</Content> | |
</Container> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment