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

226
Views
React arroja un "error de enlace no válido" al inicializar Date () en un componente funcional

React arroja el siguiente error al intentar inicializar el objeto Date en un componente funcional creado con el fragmento "rfc". No tengo ganchos en el componente. let dateObj = new Date() es lo único agregado además del fragmento.

Revisé mis versiones de React e intenté reiniciar el servidor. Usé create-react-app para crear mi proyecto React.

 Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. 

 import React from 'react' function Date() { let date = new Date() return ( <div>Date</div> ) } export default Date

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

0

Intenta cambiar el nombre de tu función.

 import React from 'react' function CurrentDate() { let date = new Date() return ( <div>Date</div> ) } export default CurrentDate

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!