-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
43 lines (38 loc) · 1.03 KB
/
App.js
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
34
35
36
37
38
39
40
41
42
43
import { Text, View, SafeAreaView, StyleSheet, ScrollView, TouchableOpacity } from 'react-native';
import OutsidePressHandler, { EventProvider } from "react-native-outside-press";
import { useState, useEffect, createContext, useContext } from 'react'
const SessionContext = createContext({});
export const useSession = () => useContext(SessionContext);
const Component = () => {
const { a } = useSession()
return (
<SafeAreaView style={styles.container}>
<OutsidePressHandler onOutsidePress={() => null}>
<View />
</OutsidePressHandler>
</SafeAreaView>
)
}
export default function App() {
return (
<EventProvider>
<SessionContext.Provider value={{ a: () => null }}>
<Component />
</SessionContext.Provider>
</EventProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
backgroundColor: '#ecf0f1',
padding: 8,
},
paragraph: {
margin: 24,
fontSize: 18,
fontWeight: 'bold',
textAlign: 'center',
},
});