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

124
Views
react native web view with static server and js

I have a hello world working with

react-native-webview serving a static html using react-native-static-server

it works fine with an html that uses inline js

but when I try to use js from a file, it won't work

here my sample html

<body>
    <div id="hello">hoola from <span id="location"></span></div>
    <script>
      var loc = document.getElementById('location');
      loc.innerHTML = window.location.href;
    </script>
    <button type="button" onclick="alabama();">Play music</button>

    <script src="./chusa.js"></script>
  </body>

so, the top script works, but then when calling chusa.js it won't work on the react native side, but if I open on a browser it is using calling the js correctly...

What do I have to do to enable the external js file please?

about 4 years ago · Juan Pablo Isaza
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!