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

169
Visualizações
scrollToIndex Out of range in react native

I am getting this error one by one on repeat. And because of this my app is closing in live mode. I have 5 to 6 FlatLists and 2 to 3 FlatListSliders in my page where I am getting this error. I do not Know what to do please help. I am applying this code in my code. but it is not working. please help


  const navigationRef = useRef(null);
  const myRef = useRef(null);
  const currentIndex = useRef(0);

  useEffect(() => {
    const timer = setInterval(() => {
      currentIndex.current =
        currentIndex.current === FlatList1.length && FlatLis2.length && FltalIst3.length && ... so on .. FlatList7.length  - 1
          ? 0
          : currentIndex.current + 1;
      myRef?.current?.scrollToIndex({
        animated: true,
        index: currentIndex.current,
      });
    }, 5000);
    return () => clearInterval(timer);
  }, []);
about 4 years ago · Juan Pablo Isaza
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