Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

webviwe

/* Outside of return */
const { localUri } = Expo.Asset.fromModule(require('./pathToFile.html'));
/* On the webView */
source={
  Platform.OS === ‘android’
  ? {
    uri: localUri.includes('ExponentAsset')
      ? localUri
      : ‘file:///android_asset/’ + localUri.substr(9),
  }
  : require(‘./pathToFile.html’)
}
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #webviwe
ADD COMMENT
Topic
Name
6+2 =