/**
* Created by YiBing on 2017/5/4.
*/
import React from 'react';
import {
AppRegistry,
Text,
Button,
View,
} from 'react-native';
import { StackNavigator } from 'react-navigation';
import { TabNavigator } from "react-navigation";
class ChatScreen extends React.Component {
// Nav options can be defined as a function of the screen's props:
static navigationOptions = ({ navigation }) => ({
title: `Chat with ${navigation.state.params.user}`,
});
render() {
// The screen's current route is passed in to `props.navigation.state`:
const { params } = this.props.navigation.state;
return (
<View>
<Text>Chat with {params.user}</Text>
</View>
);
}
}
class RecentChatsScreen extends React.Component {
render() {
const { navigate } =
React Navigation--Stack Navigator and Tab Navigator联合使用
最新推荐文章于 2024-05-23 09:59:39 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)