Initial Expo base app config with Redux
This commit is contained in:
36
App.js
36
App.js
@@ -1,21 +1,37 @@
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import React from 'react';
|
||||
import { StyleSheet, Text, View } from 'react-native';
|
||||
import { StatusBar } from "expo-status-bar";
|
||||
import React from "react";
|
||||
import {
|
||||
SafeAreaView,
|
||||
StatusBar as rnStatusBar,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View,
|
||||
} from "react-native";
|
||||
import { store, persistor } from "./redux/store";
|
||||
import { Provider } from "react-redux";
|
||||
import { PersistGate } from "redux-persist/integration/react";
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text>Open up App.js to start working on your app!</Text>
|
||||
<StatusBar style="auto" />
|
||||
</View>
|
||||
<Provider store={store}>
|
||||
<PersistGate persistor={persistor}>
|
||||
<SafeAreaView style={styles.container}>
|
||||
<View style={styles.container}>
|
||||
<Text>Open up App.js to start working on your app! ttt</Text>
|
||||
<StatusBar style="auto" />
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
backgroundColor: '#fff',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: "#fff",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
paddingTop: Platform.OS === "android" ? rnStatusBar.currentHeight : 0,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user