WebView "Error react-native-webview domain undefined error code 2 "

import * as React from 'react';

import { WebView } from 'react-native-webview';

export default class App extends React.Component {

  render() {

    return <WebView 



    source={{ uri: 'https://google.com' }} 

    style={{ marginTop: 20 }}       




Got this error went offline.
How I Fix this Error ?

if you are offline how would you expect to load the page? you can have some fallback behavior with one of the error callbacks if you want to display something different: react-native-webview/Reference.md at master · react-native-webview/react-native-webview · GitHub

1 Like

I want to show went offline “no internet connection”
how can I do it ?

Hey @plutogstudio, please follow the docs that Brent linked to. You’ll find some properties such as renderError that gives you more control over what the app will show when errors occur.

We don’t help people write code explicitly but we’re happy to help by pointing in the right direction.


how could I change the message brought by

