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

115
Visualizações
How to load a ScrollView from the bottom

I have the following ScrollView. I would like it to initially load content from the bottom, showing the last elements first so that you first scroll from bottom upwards :

<ScrollView
  vertical
  showsVerticalScrollIndicator={false}
  showsHorizontalScrollIndicator={false}>
  {chatMsgs.map(ChatMsg => (
    <ChatMsg key={Math.random()} />
  ))}
</ScrollView>  

How can I go about implementing this scenario?

I have tried display: 'flex', flexDirection: 'column', alignItems: 'flex-end', but to no success. I did not expect it to work anyway.

Thank you all in advance.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can use contentOffset props and set arbitrary y value.

 <ScrollView
  vertical
  showsVerticalScrollIndicator={false}
  showsHorizontalScrollIndicator={false}
  contentOffset={{x: 0, y: 9999}} />
  ))}>
  {chatMsgs.map(ChatMsg => (
    <ChatMsg key={Math.random()} />
  ))}
</ScrollView> 
about 4 years ago · Juan Pablo Isaza 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