@theor@theor.net · · edited

#theor_note #theor_engineering_web

My TOC at theor.net is one the best TOC implementation I have seen. Should I publish it as a React component so that people adopt my watcher pattern?

It carefully judges what is visible on the screen, and highlights all sections you are currently viewing based on the proportion of the sections currently visible on the screen.

Source code: https://github.com/theoryzhenkov/repo.home.prj_theornet/blob/main/src/scripts/toc-scrollspy.ts