📅  最后修改于: 2020-12-08 06:04:36             🧑  作者: Mango
如果您打开默认应用程序,则可以看到app.js文件看起来像
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
Open up App.js to start working on your app!
Changes you make will automatically reload.
Shake your phone to open the developer menu.
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
要显示一条简单的消息“ Welcome to Tutorialspoint”,请删除CSS部件,然后将要打印的消息插入
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
Welcome to Tutorialspoint
);
}
}