2.1 Render & JSX
..
...
render() {
const txt = 'Hello';
function say(name){
return 'I am '+name;
}
return (
<View>
<Text>This is a title!</Text>
<Text>{txt}</Text>
<View>
<Text>{say('React')}</Text>
</View>
</View>
);
}
..
...
原文: https://unbug.gitbooks.io/react-native-training/content/21render&_jsx.html