Click in order · JavaScript and React course · Module 11: Data Fetching and APIs

Initializing IntersectionObserver

Click the elements in order to create an IntersectionObserver in React:

Items to click

  • observer.current.observe(node)
  • const observer = useRef()
  • observer.current.disconnect()
  • observer.current = new IntersectionObserver(callback)

You can check the correct answer by solving this task in the CodeWorlds game.