Some usefull react hooks – window size, click outside, intersection observer
// src/hooks/useWindowSize.js Used to get window size, very useful in responsive import { useState, useEffect } from ‘react’; export const useWindowSize = () => { const [windowSize, setWindowSize] = useState({ width: undefined, height: undefined }); useEffect(() => { // only execute all the code below in client side if (typeof window !== ‘undefined’) { // … Continue reading Some usefull react hooks – window size, click outside, intersection observer
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed