intersection observer api react vs js code example Example: react-intersection-observer yarn add react-intersection-observer