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

623
Views
Error: las expresiones JSX deben tener un elemento principal

He estado creando un cuadro de entrada de contraseña, sin embargo, cuando lo pongo en mi código JS, aparece el error en el título. Aquí está mi código: (Esto también está en TailwindCSS)

 function HomePage() { return ( <div> <p className="text-center text-green-600">Welcome to Next.js a!</p> </div> <div class=" relative "> <label for="with-indications" class="text-gray-700"> Password <span class="text-red-500 required-dot"> * </span> </label> <input type="text" id="with-indications" class=" rounded-lg border-transparent flex-1 appearance-none border border-gray-300 w-full py-2 px-4 bg-white text-gray-700 placeholder-gray-400 shadow-sm text-base focus:outline-none focus:ring-2 focus:ring-purple-600 focus:border-transparent" name="passwor" placeholder="Password" /> <div class="grid w-full h-1 grid-cols-12 gap-4 mt-3"> <div class="h-full col-span-3 bg-green-500 rounded"> </div> <div class="h-full col-span-3 bg-green-500 rounded"> </div> <div class="h-full col-span-3 bg-green-500 rounded"> </div> <div class="h-full col-span-3 bg-gray-200 rounded dark:bg-dark-1"> </div> </div> <div class="mt-2 text-green-500"> Valid password </div> </div> ) } export default HomePage
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Está devolviendo 2 div s en el nivel superior. Use un fragmento u otro elemento contenedor como contenedor:

 <React.Fragment> <div>...</div> <div>...</div> </React.Fragment>
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!