Load remote assets into React-native app WebView -




can react-native application fetch remote html/js/css/img files, save local , load in webview?

context:

take example following app structure:

├── app.js ├── /remote-assets │   └── /foo │       ├── index.html │       ├── app.js │       ├── styles.js │       └── logo.jpg └── /local-assets     ├── util.js     └── background.jpg 

the idea app.js fetches assets directoy remote-assets , later loads index.html webview. html reference files in same local path, like:

<script src="app.js"></script> <img src="logo.jpg" /> 

and assets local, example:

<script src="../../local-assets/util.js"></script> <img src="../../local-assets/background.jpg" /> 





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -