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

116
Views
Combining React app with simple html/js page

Very beginner question here, after some high level guidance.

I have a React (typescript) app which simply contains a button with some blockchain functionality. I also have a simple html page which displays an interactive 3D artwork in a JavaScript file 3Dscene.js.

I simply want to combine the two elements. The 3Dscene.js contains all the module imports it needs. I was hoping I could just add a <script type = 'module' src = './3Dscene.js'> to the Reacts index.html, which works if I am just using a standard html/js setup. But it gives me an error "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html".

At a high level, how would one normally go about this?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

ok the thing is React renders the virtual DOM and it actually does not provide a way for you to display html. For that to happen in any way, create a .jsx file from your html/js code which could be rendered as one of your components. This is one legit method to achieve it. Not rendering directly is the problem here, that's the reason why web crawlers don't even crawl through react apps cuz only thing the search engines see is plain js scripts! That's where framework like Next.js comes in.

If this doesn't answer the question, could you please describe what else method have you looked for?

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