skip to Main Content

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.

  1. 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
  1. SignInScreen.js
import React from 'react'
import { View, Text } from 'react-native'
const SignInScreen =  () => {
    return (
      <text>Sign In Screen</text>
    )
}

export default SignInScreen 
  1. index.js
export {default} from "./SignInScreen";

2

Answers


  1. Chosen as BEST ANSWER

    thanks a lot my problem is solved great help.


  2. You are rendering text as <text> Your text </text>

    But

    You have to render as <Text> Your Text </Text>

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search