我使用react-native
使用ES6
试图表明 '世界你好' 为什么不显示的Hello World文本..如何在反应中显示你好世界?
这里是我的代码
https://rnplay.org/apps/zFnEdg
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
} = React;
class PropertyFinderApp extends React.Component {
render() {
return React.createElement(React.Text, {style: styles.text}, "Hello World!");
}
}
AppRegistry.registerComponent('PropertyFinderApp',() => PropertyFinderApp);
你为此创建了html文件吗?例如helloworld.html?,如果是的话,你会告诉我, –
不,我不创建helloworld.html – user944513
是不是必要的,基本上.html文件将显示HTML代码 –