Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.4 KB

File metadata and controls

21 lines (14 loc) · 1.4 KB

react-intersection-observer-api-example

Build Status Slack Greenkeeper badge

A simple application that showcases how Intersection Observer API can be used in React with createRef(). Use case: observe sections in an article and track the current viewed section in a navigation. Read more about it.

sep-06-2018 11-34-11

Features

  • intersection observer API
  • React's ref API with createRef() to reference DOM nodes
  • intersection observer API polyfill for browsers/testing

Installation

  • git clone [email protected]:the-road-to-learn-react/react-intersection-observer-api-example.git
  • cd react-intersection-observer-api-example
  • npm install
  • npm start
  • visit http://localhost:3000