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

102
Visualizações
React fade in content as view renders

I am trying to fade in content as I load it on to a View Component

I got an array of properties and every certain time I add a counter so it keeps chaging between properties.

const [counter, setCounter] = useState<number>(0)

useEffect(() => {
  const interval = setInterval(() => {
    setCounter(counter => counter + 1)
  }, time * 1000)

  return () => clearInterval(interval)
}, [properties])

This works well in changing the property but I would like to add a fade in animation that triggers everytime the counter variable changes.

return (
   <View property={properties[counter]} />
)

I tried to add CSSTrasition on the view component but it only triggers the first time and it does not fade anymore.

How can I fade in everytime there is a change of property.

Is CSSTransition the right approach? I dont want to click to fade, I just want a brief fade transition between properties

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