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

100
Views
Reaccionar - \n de mi JSON.String desaparece después de colocarlo en div

En mi componente NFTDetails hay una descripción que sale de un JSON. Hay \n\n en él. No hay una línea nueva cuando uso el valor de JSON en un div, pero hay líneas nuevas en la consola de Firefox cuando lo consuelo.log().

¿Cómo puedo usar \n para mostrar nuevas líneas en mi div.

NFTDetails.jsx - Fragmento

 const NFTDetails = ({nfts}) => { const { id } = useParams(); const navigate = useNavigate() const metadata = useMemo( () => nfts.find((nft) => String(nft.id) === id), [nfts, id] ); return ( <div className="NFTDetails"> <div className="TextCard"> <div className="NFTCName">{metadata.name}</div> <div className="Description"> <p className='DescriptionText'>Description:</p> <p>{metadata.description}</p> </div> </div>

metadatos.descripción(JSON)

 { "description":"🧬 CLONE X 🧬\n\n20,000 next-gen Avatars, by RTFKT and Takashi Murakami 🌸\n\nIf you own a clone with even one Murakami trait please read the terms regarding third-party content here: https://rtfkt.com/legal-2B.\n\nYou are not entitled to a commercial license if you own an avatar with any traits created by Murakami." }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

usar white-space: pre-line; dejar espacios en blanco como en la descripción

https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

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!