Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!