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

192
Vistas
UseEffect Not Triggering Until I Refresh For AOS

I could not find an answer here AOS Library not working except for on refresh

I am making a react app and wanted to use AOS for animating https://michalsnik.github.io/aos/.

I have a functional component with this code

import AOS from 'aos';
import 'aos/dist/aos.css';


export default function Portfolio() {

  useEffect(() => {
    AOS.init({
      duration: 1000
    });
    AOS.refresh();
  }, []);

return(
 <span className="bumper">Projects </span>
      
      <div data-aos="fade-in">
      <h3>  Hello! </h3>
      </div>
)

When I first load the page, the screen only says "Projects", and there is no "Hello!", but when I edit the "Hello!" to "Hi!" and React auto-refreshes I see the animation come in.

What is possibly happening here?

I am in the React Dev environment

    "react-dom": "^18.1.0",
    "react": "^18.1.0",
    "aos": "^3.0.0-beta.6",

about 4 years ago · Juan Pablo Isaza
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