How to use the react-native-webview function in react-native-webview

To help you get started, we’ve selected a few react-native-webview examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flow-typed / flow-typed / definitions / npm / react-native-webview_v5.x.x / flow_v0.88.x- / test_react-native-webview.js View on Github external
describe('WebView methods', () => {
  const instanceWebView = new WebView({});

  it('should passes when use properly', () => {

    (instanceWebView.goBack(): void);
    (instanceWebView.goForward(): void);
    (instanceWebView.reload(): void);
    (instanceWebView.stopLoading(): void);
    (instanceWebView.injectJavaScript('alert(1);'): void);

  it('should raises an error when call injectJavaScript without arguments', () => {
    // $ExpectError: first argument is required


React Native WebView component for iOS, Android, macOS, and Windows

Latest version published 7 days ago

Package Health Score

95 / 100
Full package analysis