import React, { Component } from 'react'; import { Text, Button } from 'react-native'; import { Menu, MenuProvider, MenuOptions, MenuOption, MenuTrigger } from 'react-native-popup-menu'; class CloseOnBackExample extends Component { state = { customBackHandler: false, } customBackHandler = (instance) => { alert(`Back button was pressed. Current menu state: ${instance.isMenuOpen() ? 'opened' : 'closed'}`); return true; } render() { return ( Two