Writing a React Table of Contents Component
Last year, I wrote about migrating this blog to Next.js. It ended up being a huge post, so I wrote a
<TOC> React component to make it more navigable.
The bulk of the logic for this component is based on Emma Goto’s great examples in her “ How to build a table of contents in React”, with a few improvements worth discussing. If you haven’t yet, go read that post! Emma does a great job…