Answer the question
In order to leave comments, you need to log in
JavaScript injection in webview in react native?
Hello!
Interested in any information about how to implement their styles and scripts in an application on REACT native , inside WEBVIEW.
Code samples, links, articles, videos, etc.
Answer the question
In order to leave comments, you need to log in
here is all the documentation that is on webview
https://github.com/react-native-community/react-na...
as an example, change the style when starting webview
const INJECTED_JAVASCRIPT = `(function() {
document.body.style.background = color;
})();`;
<WebView
source={{ uri: 'https://facebook.github.io/react-native' }}
injectedJavaScript={INJECTED_JAVASCRIPT}
onMessage={this.onMessage}
/>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question