我第一次尝试使用本机反应的任何类型的应用程序。我正在为组件/样式使用本机基础。我已经设法获得了一个非常基本的页面,但我试图弄清楚如何从这个页面转到一个页面,当从页脚中单击时,该页面会移动到不同的页面。
import React, { Component } from 'react';
import { Navigator, Container, Content, Header, Title, Button, Left, Right, Body, Icon, Footer, FooterTab } from 'native-base';
import { Col, Row, Grid } from 'react-native-easy-grid';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class AwesomeNativeBase extends Component {
render() {
return (
<Container>
<Header>
<Body>
<Title>Kays Hairdressing</Title>
</Body>
</Header>
<Content>
<Grid>
<Col style={{ backgroundColor: '#635DB7', height: 550 }}></Col>
<Col style={{ backgroundColor: '#00CE9F', height: 550 }}></Col>
</Grid>
</Content>
<Footer>
<FooterTab>
<Button>
<Text>Bookings</Text>
<Icon name="ios-book-outline" />
</Button>
<Button>
<Text>Blockout</Text>
<Icon name="ios-calendar-outline" />
</Button>
</FooterTab>
</Footer>
</Container>
);
}
}
AppRegistry.registerComponent('AwesomeNativeBase', () => AwesomeNativeBase);
我已经确定我需要使用“导航器”选项,但我无法让它工作,因为我不确定类在这个设置中是如何工作的。