Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check if expo app is running on the web

import { Platform } from 'react-native';

if (Platform.OS === 'ios') {
  // do something for ios
} else if (Platform.OS === 'android') {
  // other thing for android
} else if (Platform.OS === 'web') {
  // it's on web!
} else {
  // you probably won't end up here unless you support another platform!
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #expo #app #running #web
ADD COMMENT
Topic
Name
6+4 =