WebView page, to get the latest status of the page through the onNavigationStateChange event, one is to update the return button, and the other is to take the page title. There is nothing wrong with ordinary multiple pages, but there will be problems with a single page.
the two routes on a single page have different problems under the monitoring of webView:
- hash routing: you can listen for route changes, but the title of the obtained web page is of the previous route.
- history routing: no action can be heard at all
finally, there is no problem with the same web page in Wechat"s WebView. It is estimated that there is no way to solve the WebView that comes with RN. Is there any other third-party WebView that can support single-page H5 monitoring?