React Native error: showing blank screen on setting up react-navigation

After setting up react navigation in my react native project the screen in the android emulator turns blank and shows no errors. Below is my code for app.js

import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View, Image, Pressable } from 'react-native';
import ImageViewer from './components/ImageViewer';
import ButtonOne from './components/ButtonOne';
import * as ImagePicker from 'expo-image-picker'
import { useState } from 'react';
import IconButton from './components/IconButton';
import CircleButton from './components/CircleButton';
import EmojiPicker from "./components/EmojiPicker";
import EmojiList from './components/EmojiList';
import { Provider } from 'react-redux';
import { store } from './ReduxStore/store'

import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
// import { hello } from './modules/my-module';

import { GestureHandlerRootView } from "react-native-gesture-handler";
import ImageEditPage from './components/pages/ImagEditPage/index';
import CounterPage from './components/pages/counterPage/index';
const Stack = createNativeStackNavigator();
export default function App() {

  const [currentVal, setcurrentVal] = useState(0)

  return (
      <Provider store={store}>

        <GestureHandlerRootView style={styles.container}>
          <Text className="text-[#fff]">Hello</Text>
              options={{ title: 'Welcome' }}
            <Stack.Screen name="Counter" component={CounterPage} />

          <StatusBar style="auto" />

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#25292e',
    alignItems: 'center',
    justifyContent: 'center',
    color: "#fff"




message profile

The reason why your emulator is showing a blank screen is because you added alignItems: 'center'  to your css, remove it and your emulator should show the specific component added on that route.

Add Message

Click on the button below to add a new message to this thread


#Javascript #ReactNative

Thread detail

Satus: Open
Messages: 1Started: 2023-07-30




Frontend Development |Backend Development |Full Website Development |Bootstrap Website upgrades | Website Debbugging | Website Hosting & deployment


Interested in hiring me or collaborating with me on a project, click on any of the links below to get my social media handle

Or contact me via Tel: (+234)-806-225-7480 | Email:
Privacy Policy

By using our website,
you agree that devmaesters can store cookies on your device and disclose information in accordance with our privacy policy.