skip to Main Content

I created a react native app with expo. However, when I run it using expo start I get a fully white screen with nothing else displayed.

Screenshot:

error showed in cmd

Code :

import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

2

Answers


  1. If you are running it on device, it might be because of styling of Text. Try giving some style to it:

    <Text style={{color: "black"}}>Open up App.js to start working on your app!</Text>
    
    Login or Signup to reply.
  2. This is usually a network error. Try using npx expo start --offline

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