1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Display and Query Data by id with Gatsby context and useStaticQuery

    gatsbyGatsby
    >=2.13.1

    Similar to EventList, we'll need to create a template React component for each individual Event page.

    To do this, we'll need to add a page query, to access GraphQL variables, to query for individual events by id. Once that data is available, it can be passed into an Event component that will display the data for us.

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