How do I load local html in the react native webview?

Asked 2 years ago, Updated 2 years ago, 50 views

<WebView url='./web/webview.html' style={{flex:1}}/>
I'd like to display it in the same way as above...

reactjs

2022-09-30 21:10

1 Answers

Local HTML can be read as follows:

<WebView
  source={require('./helloworld.html')}
/>

Please refer to this.
https://facebook.github.io/react-native/docs/webview.html


2022-09-30 21:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.