• Version 13.10.5
  • Published
  • 645 kB
  • 2 dependencies
  • MIT license


npm i react-native-webview
yarn add react-native-webview
pnpm add react-native-webview


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



class WebView

class WebView<P = {}> extends Component<WebViewProps & P> {}

    property clearCache

    clearCache?: (clear: boolean) => void;
    • (Android only) Clears the resource cache. Note that the cache is per-application, so this will clear the cache for all WebViews used.

    property clearFormData

    clearFormData?: () => void;
    • (Android only) Removes the autocomplete popup from the currently focused form field, if present.

    property clearHistory

    clearHistory?: () => void;
    • (Android only) Tells this WebView to clear its internal back/forward list.

    property goBack

    goBack: () => void;
    • Go back one page in the webview's history.

    property goForward

    goForward: () => void;
    • Go forward one page in the webview's history.

    property injectJavaScript

    injectJavaScript: (script: string) => void;
    • Executes the JavaScript string.

    property postMessage

    postMessage: (message: string) => void;
    • Posts a message to WebView.

    property reload

    reload: () => void;
    • Reloads the current page.

    property requestFocus

    requestFocus: () => void;
    • Focuses on WebView redered page.

    method stopLoading

    stopLoading: () => void;
    • Stop loading the current page.


    interface FileDownload

    interface FileDownload {}

      property downloadUrl

      downloadUrl: string;

        interface WebViewNavigation

        interface WebViewNavigation extends WebViewNativeEvent {}

          property mainDocumentURL

          mainDocumentURL?: string;

            property navigationType

            | 'click'
            | 'formsubmit'
            | 'backforward'
            | 'reload'
            | 'formresubmit'
            | 'other';

              Type Aliases

              type WebViewMessageEvent

              type WebViewMessageEvent = NativeSyntheticEvent<WebViewMessage>;

                type WebViewProps

                type WebViewProps = IOSWebViewProps & AndroidWebViewProps & WindowsWebViewProps;

                  Package Files (2)

                  Dependencies (2)

                  Dev Dependencies (28)

                  Peer Dependencies (2)


                  To add a badge like this badgeto your package's README, use the codes available below.

                  You may also use to create a custom badge linking to

                  • Markdown
                  • HTML
                    <a href=""><img src="" alt=""></a>