Skip to content

Instantly share code, notes, and snippets.

@Wanuja97
Created August 13, 2022 16:00
Show Gist options
  • Save Wanuja97/82a6190aa936452d2eb05fd6d6bc8111 to your computer and use it in GitHub Desktop.
Save Wanuja97/82a6190aa936452d2eb05fd6d6bc8111 to your computer and use it in GitHub Desktop.
AOS animation in a class component
import React, { Component } from 'react'
// importing aos
import AOS from 'aos';
import 'aos/dist/aos.css';
export default class MyClassComponent extends Component {
componentDidMount() {
AOS.init();
}
render() {
return (
<div
data-aos="fade-right" //Here you can use any of the AOS animations
>
MyClassComponent
</div>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment