i18next App.tsx file
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 {SafeAreaView, StyleSheet, View, Text, StatusBar} from 'react-native'; | |
// Localization.ts code can be found here: https://gist.github.com/naishe/a6d9ea9d23214875ac176b63387ab833 | |
import './localization'; | |
import {useTranslation} from 'react-i18next'; | |
declare const global: {HermesInternal: null | {}}; | |
const App = () => { | |
const {t} = useTranslation(); | |
return ( | |
<> | |
<StatusBar barStyle="dark-content" /> | |
<SafeAreaView style={styles.main}> | |
<View> | |
<Text>{t('Welcome to React')}</Text> | |
</View> | |
</SafeAreaView> | |
</> | |
); | |
}; | |
const styles = StyleSheet.create({ | |
main: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
}, | |
}); | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment