I am making a project in react native and its showing, again and again, this error:
I am only working on 3 files and I don’t know where its issue is coming.
I am sending you the code of 3 files of code below please check them and let me know.
- App.js
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { SafeAreaView } from 'react-native-web';
import SignInScreen from './src/screen/SignInScreen';
const App = () => {
return (
<SafeAreaView style={styles.root}>
<SignInScreen />
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
}
})
export default App
- SignInScreen.js
import React from 'react'
import { View, Text } from 'react-native'
const SignInScreen = () => {
return (
<text>Sign In Screen</text>
)
}
export default SignInScreen
- index.js
export {default} from "./SignInScreen";
2
Answers
thanks a lot my problem is solved great help.
You are rendering text as
<text> Your text </text>
But
You have to render as
<Text> Your Text </Text>