import React, {Component, useEffect} from 'react';
import {
View,
Text,
BackHandler,
} from 'react-native';

const LogInView = () => {

useEffect(() => {
BackHandler.addEventListener('hardwareBackPress', () => true)
return () =>
BackHandler.removeEventListener('hardwareBackPress', () => true)
}, [])

return (
<View>
<Text>Back button example</Text>
</View>
);
}

export default LoginView