报告:目前完成度【 0.5/3 】,预计上线时间:【 未知 】 【问卷调查】
英文链接源链接 [6851]
contenteditable="true"

React Native - App 介绍

如果您打开默认应用程序,则可以看到app.js文件看起来像

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default class App extends React.Component {
   render() {
      return (
         <View style = {styles.container}>
            <Text>Open up App.js to start working on your app!</Text>
            <Text>Changes you make will automatically reload.</Text>
            <Text>Shake your phone to open the developer menu.</Text>
         </View>
      );
   }
}

const styles = StyleSheet.create({
   container: {
      flex: 1,
      backgroundColor: '#fff',
      alignItems: 'center',
      justifyContent: 'center',
   },
});

输出

Working on App

你好,世界

To display a simple message saying “Welcome to Learnfk” remove the CSS part and insert the message to be printed wrapped by the <text></text> tags inside <view></view> as shown below.

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default class App extends React.Component {
   render() {
      return (
         <View>
            <Text>Welcome to Learnfk</Text>
         </View>
      );
   }
}
Hello World
点我分享笔记