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

212
Views
Sintaxis correcta para escribir objetos anidados en JavaScript

Esta biblioteca RenderHtml en react native requiere que la variable de origen sea así

 { html: ` <p style='text-align:center;'> Hello World! </p>` };

En otra pantalla logré enviar el objeto correcto así

 html: { html: route.params.index.content.rendered },

pero aquí estoy dentro de un bucle for, así que no puedo usar setState

 const posts = this.state.data.map((item, index) => ( <TouchableWithoutFeedback key={index}> <RenderHtml source={item.excerpt.rendered} contentWidth={width} /> </TouchableWithoutFeedback> ))

Intenté todos estos a continuación, no funciona

 source={html: item.excerpt.rendered} source={'html:' + item.excerpt.rendered} source=`{html: item.excerpt.rendered}` source={`html: + $item.excerpt.rendered`}
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Encontré la respuesta:

 source={{html: item.excerpt.rendered}}
about 4 years ago · Santiago Trujillo 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!