Last active
October 17, 2019 23:31
-
-
Save shinchit/bd33541391e76f39155f908da3a9a5a1 to your computer and use it in GitHub Desktop.
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 from 'react'; | |
import { | |
TouchableHighlight, | |
View, | |
Text, | |
} from 'react-native'; | |
import withCommonProps from './withCommonProps'; | |
class SomeComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
const { | |
getLanguageCode, | |
navigateTo, | |
} = this.props; | |
// you can use getLanguageCode and navigateTo function you want. | |
const languageCode = getLanguageCode(); | |
return { | |
<TouchableHighlight onPress={() => { navigateTo(['Home', 'Plan', 'PlansList']); }}> | |
<View> | |
<Text>Move to Home->Plan->PlansList</Text> | |
<Text>Your language code is {languageCode}.</Text> | |
</View> | |
</TouchableHighlight> | |
} | |
} | |
} | |
export default withCommonProps(SomeComponent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment