Display and Query Data by id with Gatsby context and useStaticQuery

Jason Lengstorf
InstructorJason Lengstorf

Share this video with your friends

Send Tweet

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.

Syarif Banjar
Syarif Banjar
~ 2 years ago