1import * as React from 'react';
2import { Button } from 'react-native';
3import { useNavigation } from '@react-navigation/native';
4
5function MyBackButton() {
6 const navigation = useNavigation();
7
8 return (
9 <Button
10 title="Back"
11 onPress={() => {
12 navigation.goBack();
13 }}
14 />
15 );
16}