import React from 'react';import {Button, View, Text} from 'react-native';const RegistrationScreen = (navigation: any) => { return (<View><Text>My Registration Page</Text><Button title="Go Back" onPress={() => navigation.navigate('HomeScreen')}></Button></View> );};export default RegistrationScreen;
I am getting the error, when i use .tsx as extenstion of the file. ex: - RegistrationScreen.tsx, and then got the error//TypeError: navigation.navigate is not a function. (In 'navigation.navigate('HomeScreen')', 'navigation.navigate' is undefined) //