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

152
Views
cargando biblioteca js externa en reactjs

Creé una biblioteca de javascript usando webpack

Agregué el archivo en mi aplicación de reacción:

 import {Helmet} from "react-helmet"; ReactDOM.render( <React.StrictMode> <Helmet> <script src="/static/lib.js"/> </Helmet> <App /> </React.StrictMode>, document.getElementById('root') );

cuando estaba revisando las fuentes del sitio, descubrí que lib.js existe allí. Tengo un componente que necesita crear un objeto que existe dentro del archivo lib.js

 #myComponent.js class MyComponent extents Component { constructor(){ this.obj = new MyObject() // here is the problem } } render() { return <div className="main-background"> some stuff </div>; } }

Sospecho que el problema tiene algo que ver con DomReady: la biblioteca probablemente no se carga y el módulo no está definido

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

0

mi solución fue implementar el proyecto sdk que tenía en npm y npm instalarlo

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!