【发布时间】:2018-07-30 01:41:17
【问题描述】:
我在谷歌上搜索过,但我不知道反应。
当我点击“Connexion”按钮时,我希望被转发到 About.js 页面。
我的 app.js:
import React from 'react';
import {View, TextInput, StyleSheet, Text } from 'react-native';
import { Header, Button } from 'react-native-elements';
import About from './component/About';
export default class App extends React.Component {
render() {
return (
<View style={{flex: 1}}>
<Button
title="CONNEXION"
buttonStyle={{backgroundColor: "#F1C40F", borderColor: "transparent", marginTop: 20,}}
/>
</View>
);
}
}
我的 About.js
import React from 'react';
import {Text, View, StyleSheet } from 'react-native';
export default class About extends React.Component{
render() {
return (
<View style={style.view}>
<Text style={style.title}> A propos de moi</Text>
</View>
);
}
}
});
【问题讨论】:
-
您能澄清一下您的具体错误和问题是什么,以及到目前为止您为解决它所做的努力吗?另外,请改进问题的语法和格式以提高可读性。谢谢:)
标签: react-native view onpress