Created
October 29, 2019 13:42
-
-
Save udittyagi/0d16796ee10e20c7757615f1708292be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useEffect(() => { | |
if (data.length) { | |
let img = Array.from(document.getElementsByClassName('lazy')); | |
setElements(img) | |
} | |
}, [data, setElements]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment