Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

209
Vistas
Correct syntax to write nested object in JavaScript

This library RenderHtml in react native require source variable to be like that

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

In another screen I managed to send the correct object like so

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

but here I am inside a for loop so cannot use setState

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

I tried all of these below, doesnt work

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 Respuestas
Responde la pregunta

0

Found the answer:

source={{html: item.excerpt.rendered}}
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda