我正在尝试在屏幕中间制作一个按钮,单击该按钮将导航用户,并且我正在使用 react-navigation 库。如果没有 stackNavigator、HeaderNavigator 或 DrawerNavigator,我该怎么做?
import React, { Component } from 'react';
import { Text } from 'react-native';
import { Button } from 'react-native-elements';
export default class LoginButton extends Component {
onPressButton() {
console.log('pressed');
}
render() {
return (
<Button
title='LOG IN'
buttonStyle={styles.loginButton}
onPress= ## how do i do it?
/>
);
}
}
const styles = {
loginButton: {
width: 290,
height: 50,
backgroundColor: '#A91515',
alignItems: 'center',
borderRadius: 4,
marginTop: 35,
marginLeft: 49,
justifyContent: 'space-around'
}
};