Created
July 3, 2020 11:59
-
-
Save marekpiechut/474e29798489701c7c1a01215c66902f to your computer and use it in GitHub Desktop.
Get lazy loading cheap with IntersectionObserver in React
This file contains hidden or 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
| const ExerciseItem = ({ exercise }: Props) => { | |
| const [url, setUrl] = useState<?string>(null) | |
| return <div css={styles.thumb} style={{ backgroundImage: `url(${url})` }} /> | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment