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

327
Views
Problema de reacción perezosa y suspenso

Creé una aplicación de prueba simple con CRA para probar las funciones Lazy / Suspense en React 18, pero estoy atascado, este es mi código:

 // App.js import React from "react"; const Test = React.lazy(() => { import("./components/Test"); }); function App() { return ( <div className="App"> <Test /> </div> ); } export default App;

y este es mi código Test.js:

 import React from "react"; const Test = () => { return <div>test</div>; }; export default Test;

muy simple, pero cuando ejecuto npm start este es mi error de consola:

 react.development.js:1361 Uncaught TypeError: Cannot read properties of undefined (reading 'then') at lazyInitializer (react.development.js:1361:1) at mountLazyComponent (react-dom.development.js:20763:1) at beginWork (react-dom.development.js:22422:1) at HTMLUnknownElement.callCallback (react-dom.development.js:4161:1) at Object.invokeGuardedCallbackDev (react-dom.development.js:4210:1) at invokeGuardedCallback (react-dom.development.js:4274:1) at beginWork$1 (react-dom.development.js:27405:1) at performUnitOfWork (react-dom.development.js:26513:1) at workLoopSync (react-dom.development.js:26422:1) at renderRootSync (react-dom.development.js:26390:1)

No puedo entender dónde me equivoco. ¿Algunas ideas? ¡gracias a todos!

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!