-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
33 lines (28 loc) · 746 Bytes
/
App.js
File metadata and controls
33 lines (28 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { SafeAreaView, StyleSheet, Text } from 'react-native';
import React, { Suspense } from 'react';
import { useTranslation } from 'react-i18next';
const App: () => Node = () => {
return (
<Suspense fallback={<Text>Loading... </Text>}>
<MyComponent />
</Suspense>
);
};
function MyComponent() {
const { t } = useTranslation();
return (
<SafeAreaView style={styles.container}>
<Text>{t('textSimple1')}</Text>
<Text>{t('textSimple2')}</Text>
<Text>{t('textWithCount', { count: 1 })}</Text>
<Text>{t('textWithCount', { count: 5 })}</Text>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
backgroundColor: '#f3f3f3',
flex: 1,
},
});
export default App;