Skip to content

Instantly share code, notes, and snippets.

View ioxua's full-sized avatar
🎏
Existing

Yehoshua Oliveira ioxua

🎏
Existing
View GitHub Profile
@koistya
koistya / App.js
Last active June 8, 2022 09:55
How to add `onscroll` event in ReactJS component
import React from 'react';
let lastScrollY = 0;
let ticking = false;
class App extends React.Component {
componentDidMount() {
window.addEventListener('scroll', this.handleScroll, true);
}