diff --git a/screens/HomeScreen.js b/screens/HomeScreen.js index b3ffe32b..fcd83a54 100644 --- a/screens/HomeScreen.js +++ b/screens/HomeScreen.js @@ -204,6 +204,11 @@ const HomeScreen = observer(() => { onLoadEnd={() => { setIsLoading(false); }} + // Reload the webview if the process terminated in the background + // refs: https://github.com/react-native-webview/react-native-webview/blob/1d8205af06dbb0bad0d8f208bb2a37ce5f732fd3/docs/Reference.md#oncontentprocessdidterminate + onContentProcessDidTerminate={() => { + webview.current?.reload(); + }} /> diff --git a/screens/__tests__/__snapshots__/HomeScreen.test.js.snap b/screens/__tests__/__snapshots__/HomeScreen.test.js.snap index 0c8f5cfd..64c4a3a3 100644 --- a/screens/__tests__/__snapshots__/HomeScreen.test.js.snap +++ b/screens/__tests__/__snapshots__/HomeScreen.test.js.snap @@ -138,6 +138,7 @@ exports[`HomeScreen should render correctly 1`] = ` }, ] } + onContentProcessDidTerminate={[Function]} onError={[Function]} onHttpError={[Function]} onLoadEnd={[Function]}