-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.tsx
More file actions
29 lines (23 loc) · 859 Bytes
/
App.tsx
File metadata and controls
29 lines (23 loc) · 859 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
import { StatusBar } from 'expo-status-bar';
import React, { useEffect } from 'react';
import { LogBox, StyleSheet, Text, View } from 'react-native';
import { Home } from './src/Screens/Home';
import messaging from '@react-native-firebase/messaging';
LogBox.ignoreLogs(["Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function."])
export default function App() {
async function token(){
messaging().getToken().then((token) => console.log(token));
};
useEffect(() => {token();}, []);
return (
<Home />
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});