You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current version, when the web view is reloaded (connection problems or Apple Pay),
We lose all the web view history and if the user was submitting a form, we lose all of it's body. This leads to a bad user experience
How to solve it ?
We need to create an issue on react-native-webview asking for access to the user's history and request data (body and headers) through navigation events.
Save the history in a global state and when the webview is reloaded, set those values programmatically through the library's props.
If a history exists, use the last URL of the history, otherwise pass a URL.
Example:
interfaceIHistory{url: string// all necessary datarequest: {headers: {}body: {}}}const[historyState,setHistory]=useState<IHistory[]>();<Webviewsource={{[historyState ? "history" : "url"]: historyState||"mysite.com"}}onNavigationStateChange={({ history })=>{setHistory(history);}}/>
The text was updated successfully, but these errors were encountered:
Introduction
In the current version, when the web view is reloaded (connection problems or Apple Pay),
We lose all the web view history and if the user was submitting a form, we lose all of it's body.
This leads to a bad user experience
How to solve it ?
We need to create an issue on react-native-webview asking for access to the user's history and request data (body and headers) through navigation events.
Save the history in a global state and when the webview is reloaded, set those values programmatically through the library's props.
If a history exists, use the last URL of the history, otherwise pass a URL.
Example:
The text was updated successfully, but these errors were encountered: