Browse Source

back handler handling

pull/8/head
Tim Glasgow 2 years ago
parent
commit
0010cf7ee5
  1. 8
      squarenotsquare/src/screens/Home.js

8
squarenotsquare/src/screens/Home.js

@ -1,11 +1,15 @@
import React from "react";
import { Text, View } from "react-native";
import React, { useEffect } from "react";
import { BackHandler, Text, View } from "react-native";
import { useState } from "react";
import { styles } from './styles/AppStyles';
import { TouchableOpacity } from "react-native-gesture-handler";
function Home(props){
useEffect(() => {
BackHandler.addEventListener('hardwareBackPress', () => {return true});
}, [])
return (
<View style={[styles.flex]}>
<View style={[styles.flexHalf, styles.spaceAround]}>

Loading…
Cancel
Save