Skip to content

Instantly share code, notes, and snippets.

View f22hd's full-sized avatar
🎯
Focusing

Fahd Allebdi f22hd

🎯
Focusing
View GitHub Profile
@f22hd
f22hd / Readme.markdown
Created October 3, 2023 12:10 — forked from mat/Readme.markdown
apple-app-site-association —with examples

“apple-app-site-association” file

One file for each domain, both www.example.com and example.com need separate files:

{
    "applinks": {
        "apps": [],
        "details": {
 "9JA89QQLNQ.com.apple.wwdc": {
@f22hd
f22hd / infinite-scroll-hook.ts
Created January 1, 2022 21:53
Infinite Scroll hook, react with typescript
import { useEffect } from 'react'
export const useInfinitScroll = (selector: string, keepObserving: boolean = false, callback: Function) => {
useEffect(() => {
const target: Element = document.querySelector(selector) as Element;
// more options on https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#creating_an_intersection_observer
const options = {
threshold: .5
}
const handleIntersection = (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => {