Wednesday, 5 January 2022

React Native webview routing

I'm actually building a React-Native app, with some native screens, and some screen where I load the website with a webview. Instead of the classical website navigation, I have a native drawer allowing me to switch pages. My issue is that the website is using react-router, so it handles smoothly the url change on browsers by loading only the necessary code, but when I change the url in my webview, it does as if I was refreshing the website, and it reloads everything, leading up to a very slow navigation.

The only 'hack' I tought of would be exposing a function on the website window variable to trigger a react-router 'go to'.

Any ideas ?



from React Native webview routing

No comments:

Post a Comment