I currently have a react native webview where the url is set to the path to a html file inside my workspace. In development, everything is working accordingly and the page gets rendered with the parameters set in the url.
My problem, i would like to move to production and hence the IP address used in the path to the index.html file is no longer available.
Here is my code:
const [url,setUrl]=useState(`http://IPADDRESS_ONMYCOMPUTER:19000/app/screens/Payment/index.html?sessionId=${route.params.sessionId}`)
return (
source={{uri:url}}
)
Update
I have created the html files on my server and are working accordingly when i access them from the browser. Unfortunately, they are not working inside my webview in react native.
I keep getting an error and the page doesnt load.
Here is my updated Code:
Here is my code:
const [url,setUrl]=useState(`http://SERVERIPADDRESS/api/payments/index.html?sessionId=${route.params.sessionId}`)
return (
source={{uri:url}}
)