Gourav Sanyal
Gourav Sanyal

Reputation: 166

Expo web browser emulator is blank - React Native Error

While working on my app yesterday, the web emulator of Expo was working properly.

Now when I am trying to start the app on the browser today using expo start and then w, the whole screen is blank.

Nothing is there on the browser.

What kind of issue is this? How should I fix this?

Image of the emulator:

enter image description here

EDIT

These are the Screenshot from Snack:

App.js

enter image description here

LoginScreen.js

enter image description here

HomeScreen.js

enter image description here

Upvotes: 1

Views: 2353

Answers (1)

Adil kasbaoui
Adil kasbaoui

Reputation: 663

The problem you're having is in navigation and has nothing to do with emulator,

the issue is that react Navigation on web require linking prop, you can check for details in documentation

Another solution is to use @react-navigation/web and here is a example web navigation in react native

For your case try using :

const LoginScreen({navigation}) 

and use navigation object normally like that :

navigation.navigate('HomeScreen')

no need to use useNavigation

Upvotes: 1

Related Questions