Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
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 Respostas
Responde à pergunta

0

Found the answer:

source={{html: item.excerpt.rendered}}
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda