Reputation: 166
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:
EDIT
These are the Screenshot from Snack:
App.js
LoginScreen.js
HomeScreen.js
Upvotes: 1
Views: 2353
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