Become a member
to unlock all features

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

Create account

    Display Sorted Data with useStaticQuery in Gatsby


    Now that the event list data is available to us and the subsequent pages created, we need to create a template in Gatsby to render this list too.

    In this lesson we'll use useStaticQuery provided to us from Gatsby and query for the data available. Then a EventList component will be created for that data to be passed into and displayed properly.

    A Layout Component will also be created so there is a consistent look throughout our application.

    For a written version of this course, check out the Gatsby docs.