jvr*_*esx 3 navigationbar react-native react-native-android
我正在使用React Native创建一个移动应用程序,我决定使用来自网站“ https://github.com/beefe/react-native-navigation-bar ” 的导航栏,但我不知道如何使用它在我的代码中。
我希望您向我发送网站“ https://github.com/beefe/react-native-navigation-bar ” 的导航栏示例。
我认为您在问之前应该尝试仔细阅读。
该站点清楚地显示了如何使用此组件。只需2个步骤:
安装软件包。
npm install react-native-navigation-bar --save
Run Code Online (Sandbox Code Playgroud)导入和使用。按您喜欢的方式更改属性。
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import NavigationBar from 'react-native-navigation-bar';
export default class Example extends Component {
render() {
return (
<View>
<NavigationBar
title='Main title'
height={50}
leftButtonTitle='back'
rightButtonTitle='forward'
/>
<Text>ABC</Text>
</View>
);
}
}
Run Code Online (Sandbox Code Playgroud)| 归档时间: |
|
| 查看次数: |
14874 次 |
| 最近记录: |