It works inside the render method but i wanna do it in the Header top right button i.e Add link… kindly guide…
import React, {
Component
} from ‘react’;
import {
View,
Button,
Text
} from ‘react-native’;
// import { FormLabel, FormInput } from ‘react-native-elements’
class AllPropertiesScreen extends React.Component {
static navigationOptions = {
title: 'All',
headerRight: <Button title="Add"
/>,
};
render() {
return (
AllPropertiesScreen
AllPropertiesScreen Screen
AllPropertiesScreen Screen
<Button
onPress={() => this.props.navigation.navigate('createProperty', {name: 'Lucy'})}
title="Go to CreateProperty"
/>
</View>
);
}
}
export default AllPropertiesScreen;
//