Create a Custom React Hook Using Gatsby’s useStaticQuery to Query Custom Sourced Data

Share this video with your friends

Send Tweet

In this lesson, we'll create a new custom React Hook that we'll use to make a GraphQL query to request data that we custom sourced from the PokeAPI. We'll walk through migrating our useStateQuery Gatsby hook to our new custom hook, configuring our output of the custom hook, and using it to access our custom sourced data.