There's a faster version of egghead. Click here to try it.
Become a member
to unlock all features

Create an egghead account to access 5000+ tutorials and resources from expert developers.

Create account

    Create a Table of Contents Component for MDX Documents in Gatsby


    When you use a component for your table of contents in MDX documents you have more flexibility around how you render it. In this lesson, we'll use Gatsby's GraphQL data layer to fetch the headings in an MDX document and pass them to a TableOfContents component that we create.