This is what I got when ran the code in my mobile phone using expo
This is the code for the app
import React from 'react';
import { Teext, StyleSheet } from 'react-native';`enter code here`
const ComponentsScreen = () => {
return <Text style={styles.textStyle}> Hello World! </Text>
};
const styles = StyleSheet.Create({
textStyle: {
fontsize: 30
}
});
export default ComponentsScreen;
This is the code that I ran and I don't know what the error is.
import { Teext, StyleSheet } from 'react-native';`enter code here`
it should be Text
not Teext and you need to wrap it into a View Parent
const ComponentsScreen = () => {
return(
<View>
<Text style={styles.textStyle}> Hello World! </Text>
</View>
)
};
do this and Welcome To React Native !
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.