Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
Get URL & Query from WebView's onNavigationStateChange event

Currently I am able to get the base URL of a page when clicked using the following WebView configuration

const handleUrlChange = (url:string) => {
   if (url == videUrl) return;

   setVideoUrl(url);
   console.log(url);
}; 

<WebView 
   startInLoadingState={true} 
   source={{ uri: 'https://m.youtube.com/'}} 
   onError={err => console.warn(err)}
   originWhitelist={['https://m.youtube.com/']}
   onNavigationStateChange={({ url }) => {
      urlChangeHandler(url)
   }}
/>

The problem is, the entire URL does not show.

When going to https://m.youtube.com/watch?v=aqz-KE-bpKQ only https://m.youtube.com/ returns as url. I need to be able to read watch?v=aqz-KE-bpKQ as well to identify which video a user has navigated to.

How can I retrieve the entire URL?

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!