Become a member
to unlock all features

Create egghead account to access 1,000+ 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.