Reputation: 25
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.
Upvotes: 0
Views: 81
Reputation: 1439
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 !
Upvotes: 1